[PyQt] Is it possible to use custom enums for custom widgets?

dboddie at trolltech.com dboddie at trolltech.com
Fri Jan 23 14:57:40 GMT 2009


On Fri Jan 23 12:53:13 GMT 2009, Umit Oztosun wrote:

> I am using custom widgets and plugins. I can define custom properties
> using pyqtProperty() using standart Qt types like int, bool, QColor
> etc. I wonder if it is possible to use custom types, i.e. when the
> widget is used in Qt Designer, I want a combobox to be displayed in
> the Property Editor for the custom property (just like, for example,
> focusPolicy QWidget property).
>
> Is there a way to do this?

It didn't seem to be possible the last time I tried to do this. I believe
that PyQt's meta-object support could be extended to allow custom enums
to be created in Python, but I don't know how much work it would be.

David


More information about the PyQt mailing list