As the documentation says: properties that are marked as designable (most of them), will be displayed in the QtDesigner's property editor.
Cheers,
_
As the documentation says: properties that are marked as designable (most of them), will be displayed in the QtDesigner's property editor.
Cheers,
_
What the documentation doesn't give away:
WHERE will it be displayed in the QtDesigner's property editor?
Robby
I am not sure what you mean.
The property editor iterates over the properties and displays them grouped by the class they are declared in, starting with QObject, ending with the actual class itself.
E.g. if you look at the properties of a QPushButton, the first section has the properties of QObject, then QWidget, then QAbstractButton, then QPushButton.
So if you derive from QPushButton and add another property, it will be in its own section, following the QPushButton section.
Cheers,
_
That's exactly my problem:
My ui is a when I select the mainWindow in the object-tree, there are only three categories in the property editor: QObject, QWidget and QMainWindow. There is no Category as the name of my class "mainWindow" (see following pic).
PropertyEditor.PNG
even if I build two new classes (Form1 : QWidget AND Form2 : Form1) and i set a Q_Property with the name smallText in Form1, i see in the property-editor of "Form2" neither a category "Form1" nor a property "smallText" in any other category.
What am i doing wrong?
Thanks for your help
Robby
The type is QMainWindow, as you can see in the second column in the object tree view.
Does the designer plugin that provides "Form1" create instances of Form1 or maybe just QWidget?
Does Form1 have the Q_OBJECT macro additional to the Q_PROPERTY macro?
Cheers,
_
Bookmarks