How to set name of custom widget in Qt designer?
i did not find any remarks in the docs about this issue. I added a custom widget to Qt designer by using QDesignerCustomWidgetInterface and returned the widget class name in the QDesignerCustomWidgetInterface::name() method. Now the designer displays the class name in the widget box. But i want a more readable widget name to be displayed like "My Button". How can i achieve this?
Thanks in advance.
Ok, figured it out today by having a look at the designer source code.
The designer converts the XML returned by
The parseXml() method clearly states that one have to add the attribute displayname to the widget xml tag, for example:
@<ui language="c++" displayname="My Custom Widget">
<widget class="..." ...>