[PyQt] Can I use custom enumerations for custom pyqtProperty's?

Kyle Altendorf sda at fstab.net
Fri Feb 19 17:41:12 GMT 2016


I am making a set of widgets which are usable in Qt Designer.  It works 
great and was fairly easy.  I am quite pleased.  :]  I have now added a 
couple of QString properties as well and also want enumeration/combobox 
properties such as shows for the focusPolicy QWidget property.  Is this 
possible?  If so how?

I searched around and found a couple old queries on the topic.

[PyQt] Is it possible to use custom enums for custom widgets?
https://riverbankcomputing.com/pipermail/pyqt/2009-January/021655.html

[PyQt] How do you declare enum / flag based pyqtProperties in PyQT just 
like Q_ENUMS / Q_FLAGS macroes?
https://riverbankcomputing.com/pipermail/pyqt/2011-February/029309.html

I was hoping that perhaps the answers had changed in the past several 
years and that this is now possible.  Thanks for any guidance.

Cheers,
-kyle

P.S. If interested, my widgets (and the rest of my application) is 
available at:

https://github.com/altendky/st/tree/cbde14742efb1634daa608e6793a4c71b1e7100c/epyq/widgets


More information about the PyQt mailing list