Details
-
Bug
-
Resolution: Done
-
P4: Low
-
None
-
5.15.4, 6.3.1
-
None
-
Python 3.10.5
PySide6 6.3.1 , PySide2 5.15.5
Manjaro Linux
-
c140a3cef8 (pyside/pyside-setup/dev) c140a3cef8 (pyside/tqtc-pyside-setup/dev)
Description
Setting declared Qt properties via named constructor arguments to QVBoxLayout and QHBoxLayout does not work i.e
from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout layout = QVBoxLayout( objectName="layout", spacing=0 ) assert layout.spacing() == 0 assert layout.objectName() == "layout" layout = QHBoxLayout( objectName="layout", spacing=0 ) assert layout.spacing() == 0 assert layout.objectName() == "layout"
raises assertion errors.
However QBoxLayout does work
layout = QBoxLayout( QBoxLayout.TopToBottom, objectName="layout", spacing=0 ) assert layout.spacing() == 0 assert layout.objectName() == "layout"
The same behavior is present in PySide2 and PySide6
Attachments
For Gerrit Dashboard: PYSIDE-1986 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
424826,2 | Fix setting properties by named arguments for Q[VH]BoxLayout | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |