[PySide] setLayout and setCentralWidget when using true_property

Friedemann Kleint Friedemann.Kleint at qt.io
Mon Nov 21 08:48:43 CET 2022


Hi,

 > Is this intended behaviour or an oversight? If intended, why should 
setting a layout/widget be different to setting text or setting a widget 
to be enabled?

Only properties which are visible in Qt Designer (and are declared as 
such  by using the Q_PROPERTY macro in the C++ class, see  
https://doc.qt.io/qt-6/qmainwindow.html ) are exposed as Python 
properties.  There are other setters/getters following this naming 
convention like setCentralWidget(), but they are not really properties 
in the sense of designable, orthogonal widget properties.

This is ATM not really visible in the QfP documentation, which can be 
improved.

Regards, Friedemann

-- 

Friedemann Kleint
The Qt Company GmbH



More information about the PySide mailing list