QDesignerCustomWidgetInterface name in palette
-
Hello, have created my own widgets with the deriving from the
QDesignerCustomWidgetInterface.The shown name of the widgettype in the palette of the Designer is build of the
QDesignerCustomWidgetInterface.name()
function. In the documentation you can read, it must give the same as the class name of the widget.So far so good, but I want a more human readable name for it in the palette, similar to the standard qt widgets ( QComboBox -> Combo Box).
Is this possible ?
I tried to change the name in the name() function and indeed an other name is shown, but all additional propierties of the widget in the editor will not be shown.
-
Hello, have created my own widgets with the deriving from the
QDesignerCustomWidgetInterface.The shown name of the widgettype in the palette of the Designer is build of the
QDesignerCustomWidgetInterface.name()
function. In the documentation you can read, it must give the same as the class name of the widget.So far so good, but I want a more human readable name for it in the palette, similar to the standard qt widgets ( QComboBox -> Combo Box).
Is this possible ?
I tried to change the name in the name() function and indeed an other name is shown, but all additional propierties of the widget in the editor will not be shown.
I don't quite understand what you are asking for.
I mean, if you look at the Analog Clock example, it's done like this:
QString AnalogClockPlugin::name() const { return u"AnalogClock"_s; }
Can't you just put your desired name there (and name your class the same way)?
-
I don't quite understand what you are asking for.
I mean, if you look at the Analog Clock example, it's done like this:
QString AnalogClockPlugin::name() const { return u"AnalogClock"_s; }
Can't you just put your desired name there (and name your class the same way)?
@Pl45m4 said in QDesignerCustomWidgetInterface name in palette:
I don't quite understand what you are asking for.
I mean, if you look at the Analog Clock example, it's done like this:
QString AnalogClockPlugin::name() const { return u"AnalogClock"_s; }
Can't you just put your desired name there (and name your class the same way)?
Its more for esthetic than functionality:
My Class ist "AdvancedComboBox" but I will see in the Designer palette somthing like " Combo Box (advanced).
Similar to to the standard widgets:
For class QComboBox I see in the designer the text "Combo Box".