[Qt-interest] widget promotion
ami guru
dosto.walla at gmail.com
Sat Dec 27 14:05:44 CET 2008
Hello forum,
I have customized class with QGaphicsView as a base class .
In the designer i have a main window and dragged a QGraphicsView
widget and placed that in the form to use that as the placeholder.
Then i promoted that to my customized one.
The customized class that i have has a constructor.
What should be the defualt parameter in the constructor
********************************************************'
class H3DNodeView : public QGraphicsView
{
H3DNodeView(QWidget *parent = 0);
};
****************************************************************'
In that case i have error
H3DNodeView.cpp: In constructor 'H3DNodeView::H3DNodeView(QWidget*)':
H3DNodeView.cpp:5: error: type 'QWidget' is not a direct base of
'H3DNodeView'
I tried removing that parameter resulting in a following constructor
H3DNodeView::H3DNodeView()
in that case i have anotther error from the ui_***.h file. And that is
logical
because my custom class is inside the another widget
Any suggestion to get around that problem?
Regards
Sajjad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081227/db695cde/attachment.html
More information about the Qt-interest-old
mailing list