New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QtCore.QVariant for PySide #5
Comments
In fact, just found that |
I'm unsure about this. Qt5.py, like Qt.py, should use the PySide2 bindings as target interface. And PySide2 doesn't have QVariant. So, ideally, Qt5.py shouldn't have QVariant either. If we do add it, then it's not clear what else to add that isn't already in PySide2. :S Would it be an option for you to stick with "QVariant", as recommended by the PySide2 authors? |
Yes, you are right, shouldn't start adding things that wasn't there. And yes, stick with "QVariant" is the best option. |
believe this issue can be closed? |
QtCore.QVariant
was missing in PySide, but the document mentioned that one could just use"QVariant"
like:This works for Python built-in types, but looks like not all custom types will be handled properly.
Hit the Emit button and the result will be:
Notice that although the instance of
Thing
stays the same, but the instance ofSheet
has became just alist
.But if you change
"QVariant"
toobject
Then:
They both get preserved.
So maybe we should use
object
instead of"QVariant"
to fill up this gap ?And, anyone knows why it works in this way in PySide ?
The text was updated successfully, but these errors were encountered: