Details
-
Bug
-
Resolution: Done
-
P4: Low
-
None
-
6.1.3
-
None
-
-
292a8e2426b14f98f4863dc58b5bf363ca97e748 (pyside/pyside-setup/dev) 242300c1cd9d0b0eca6114064a24e87b6ea51ab7 (pyside/pyside-setup/6.2)
Description
QFlags cannot be accessed via the property method, for example:
from PySide6.QtWidgets import QApplication, QLabel app = QApplication() label = QLabel("Foo") print(label.text()) print(label.alignment()) print(label.property("text")) print(label.property("alignment"))
Output:
Foo <PySide6.QtCore.Qt.Alignment object at 0x7f37364cb6f0> Foo Traceback (most recent call last): File "/home/qt/main.py", line 10, in <module> print(label.property("alignment")) RuntimeError: Can't find converter for 'QFlags<Qt::AlignmentFlag>'.
I am going to attach a demo where other properties are affected.
Attachments
For Gerrit Dashboard: PYSIDE-1673 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
375003,6 | PySide6: Fix QObject.property() for QFlag types | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
375318,2 | PySide6: Fix QObject.property() for QFlag types | 6.2 | pyside/pyside-setup | Status: MERGED | +2 | 0 |