[PyQt] Using a function for the pyqtProperty designable attribute
Phil Thompson
phil at riverbankcomputing.com
Sun May 15 10:09:38 BST 2016
> On 15 May 2016, at 2:54 am, Kyle Altendorf <sda at fstab.net> wrote:
>
> I was looking to make a pyqtProperty be run-time configurable for being designable or not. I've quoted the PyQt5 and Qt documentation on the topic below and while it appears that Qt supports specifying a function for the designable attribute, PyQt5 does not (no mention in the documentation and it didn't work for me in 5.5.1. I admittedly did not try 5.6). Am I correct that PyQt5 cannot control the designable attribute dynamically? Any plans to implement this? I have solved my issue another way but figured I would ask.
>
> http://pyqt.sourceforge.net/Docs/PyQt5/qt_properties.html
>> designable – optionally sets the Qt DESIGNABLE flag. It is ignored by Python
>
> http://doc.qt.io/qt-5/properties.html
>> The DESIGNABLE attribute indicates whether the property should be visible in
>> the property editor of GUI design tool (e.g., Qt Designer). Most properties
>> are DESIGNABLE (default true). Instead of true or false, you can specify a
>> boolean member function.
You are correct, I'll add it to the TODO list.
Phil
More information about the PyQt
mailing list