Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Python custom widget for Qt Designer
Pierone last edited by
I have develop , for windows desktop, a Python Qt Designer custom widget (running!) in
the following environment:
Python 3.6.1 installed in C:\Python36
PyQt5 installed using pip3 install pyqt5
Qt Designer installed using pip3 install pyqt5-tools
You can download the source files at:
In C:\PYTHON\MM_Widget_Library run BuildALL.bat
In C:\PYTHON\Line_test run test_line.py
You can see new widget by running
Selecting T_line, right in the Property Editor appear
ColorON Color_OFF OrientationVertical
It's easy to add new properties in the code
of type int, str (= string), float.
For each property, it will appear in the Qt Design Property Editor
a new line with the assigned name and the ability to edit the content.
--- THE PROBLEM ----
I would like to add a new property (STATIC!), enumerative type or list.
I would like to a new property that allows to choose one of the options.
Showing a drop down menu, a combo, or similar stuff
I tried to use:
NewProp = pyqtProperty("QList", NewProp, setNewProp)
NewProp = pyqtProperty("QListWidget", NewProp, setNewProp)
NewProp = pyqtProperty("StringList", NewProp, setNewProp)
Can anybody help me?
PJM4B last edited by
@Pierone Can you put you code in GitHub instead of a rar file? Its pretty awkward to unpack your code.