PDA

View Full Version : QStackedWidget Problem



sujan.dasmahapatra
27th April 2011, 10:28
Dear Friends


class COptWidget : public QWiget
{
Q_OBJECT
public:
COptWidget(SomeOtherClass *parent=0);
~COptWidget();
};

COptWidget *plotopt = new COptWidget(pointerToSomeOtherClass);
QStackedWidget *curPlot = new QStackedWidget;
curPlot->addWidget(plotopt);
curPlot->setCurrentWidget(plotopt);


But with this I am not able to see the plot what am I missing here. Application crashed at curPlot->addWidget(plotopt);

high_flyer
28th April 2011, 11:13
try calling show() on your COptWidget.