[QGIS-Developer] Can we check for "wrapped C/C++ object of type QgsLayerTreeGroup has been deleted"

qgis at ag99.de qgis at ag99.de
Mon Aug 31 11:07:59 PDT 2020


i used to check if the C++ object is gone during runtime with 
sip.isdeleted(object)... it's no silver bullet and i don't know if this 
helps you, though.

see: 
https://www.riverbankcomputing.com/static/Docs/PyQt5/api/sip/sip-module.html?highlight=isdeleted#isdeleted

Cheers

Jonas

On 31.08.2020 18:15, David Erill wrote:
> Hi Richard,
> Actually we have a similar issue with one of our plugins, so if anyone 
> can give feedback about how to handle this situation, it would be great.
> I'm talking about any kind of Qgs class, not only about QgsLayerTreeGroup:
> "wrapped C/C++ object of type QgsXXX has been deleted"
>
> Missatge de Richard Duivenvoorde <rdmailings at duif.net 
> <mailto:rdmailings at duif.net>> del dia dl., 31 d’ag. 2020 a les 13:43:
>
>     On 2020-08-31 11:27, Richard Duivenvoorde wrote:
>
>     > OR is this specific case a QGIS issue, as creating a GroupLayer
>     maybe
>     > should also create a c++ grouplayer?
>
>     Forget this part: there IS a c++ grouplayer...
>
>     Regards,
>
>     Richard
>     _______________________________________________
>     QGIS-Developer mailing list
>     QGIS-Developer at lists.osgeo.org <mailto:QGIS-Developer at lists.osgeo.org>
>     List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>     Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200831/7e5d8750/attachment.html>


More information about the QGIS-Developer mailing list