PDA

View Full Version : QwtPlot - promote to custom widget


MrGarbage
20th April 2007, 18:32
Hi,
I am using qwt and have successfully integrated this into my QT designer such that
I can choose and use a QwtPlot widget from the QT toolbox.

I want to be able use my own class derived from QwtPlot. Ideally I would
move a QwtPlot from the toolbox onto my form, right click and choose Promote to Custom widget.

This option is not available when I right click on a QwtPlot object.
I don't want to do a plug-in, at least not at this stage of the game.

How can I use both QT Designer and my own class derived from QwtPlot?

Thank you!

marcel
20th April 2007, 22:03
In the dialog class add a member of your QwtPlot subclass and cast the Ui QwtPlot widget from the dialog to your custom widget. Use this custom widget throughout the app, instead of the Ui member.

This is almost identical to promoting to custom widget ,except that ui_xxx.cpp will know nothing about your custom class. Nothing wrong with that, in my opinion...

Regards

codebehind
27th April 2007, 16:47
I am using qwt and have successfully integrated this into my QT designer such that
I can choose and use a QwtPlot widget from the QT toolbox.
Excuse my small knowledge about Qt Designer.
How can i add qwt widgets to Tools in QtDesigner?