RAM
RAM

Reputation: 2749

How to show custom widgets included in UI forms?

Qt Creator lets users promote QWidget instances to a custom class. However, promoting a QWidget instance to a custom widget (i.e., a Qt form class that inherits QWidget) doesn't get Qt Designer to render that widget in the UI's layout. Is there a way to get Qt Creator to render a custom widget as part of the widget that includes it?

Upvotes: 0

Views: 824

Answers (1)

p-a-o-l-o
p-a-o-l-o

Reputation: 10047

Yes, you can provide a Qt Designer plugin along with your custom widget class, as explained in Creating Custom Widgets for Qt Designer .

This is not easy, but you will end up with your custom widget shown in the designer toolbox.

One of the hardest parts: plugins have to be built with the same compiler used to build Qt Creator, which generally leads to downloading creator sources and build your own version.

Upvotes: 1

Related Questions