thats easy:
* in the qtdesigner, put a QWidget as placeholder on your widget (can be any class derived by qwidget, I usually take a QListView)
* rightclick on this QWidget you'd like to promote
* in the contextmenu, choose "promote to..."
* fill in your custom class name (e.g. "MyCustomQwtPlot") and the header file your class is located in (e.g. "MyCustomQwtPlot.h")
* press enter and the "Promote" button gets enabled
* click this button and everything should work![]()
i have done this in following way:
-manually edit *.ui file
-find tag customwidgets
-add sub tag
<customwidget>
<class>QwtPlotEx</class>
<extends>QwtPlot</extends>
<header>qwt_plotex.h</header>
</customwidget>
-save
-open this file in "QT designer"
-promote QwtPlot to QwtPlotEx !!
-create qwt_plotex.h and qwt_plotex.cpp
ken123 (20th October 2011)
Bookmarks