[PyQt] [sip] some low level issues with meta enum and flags
denis.rouzaud at gmail.com
Fri May 18 16:06:20 BST 2018
Hi list, hi Phil,
I have been playing a bit with meta enum and I encountered two issues:
1. If you copy the meta enum object, you get a seg fault.
For instance, doing:
idx = baseClass.staticMetaObject.indexOfEnumerator(enumClass.__name__)
meta_enum = baseClass.staticMetaObject.enumerator(idx)
And then do meta_enum_2 = meta_enum, you'll get a seg fault when trying to
use it (calling any method, while sip.dump still seems to return valid
This is not a huge deal, but it can lead to further issue: if you have a
method where the meta_enum is provided as argument and get copied there.
For instance, we have a method with some MethodCode:
QgsSettings::value( const QString &key, const QVariant &defaultValue =
While providing the meta enum as default value, if I try to access it
later, I do get a seg fault too.
2. It seems that flags types are not added to the module itself but to the
In other words, __qualname__ returns the same than __name__
Which gives troubles at retrieving information.
Can this be fixed?
Thanks for your time,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt