Hello!
I'm trying to add widget to an existing page of QStackedWidget. My code:
widgetPointer = new myWidget(this);
widgetPointer->setLayout(ui->widgetLayout);
widgetPointer
->setGeometry
(QRect(0,
0,
430,
310));
ui->stackedWidget->insertWidget(0, widgetPointer);
wykresStan
->move
(QPoint(0,
0));
widgetPointer = new myWidget(this);
widgetPointer->setLayout(ui->widgetLayout);
widgetPointer->setGeometry(QRect(0,0,430,310));
ui->stackedWidget->insertWidget(0, widgetPointer);
wykresStan->move(QPoint(0,0));
To copy to clipboard, switch view to plain text mode
Widget adds to QStackedWidget but it also creates new page with index '0'. And my '0' page is now '1'. I've tried:
widgetPointer = new myWidget(ui->widgetLayout);
widgetPointer = new myWidget(ui->widgetLayout);
To copy to clipboard, switch view to plain text mode
But widget added 'on top' of QStackedWidget. Any ideas?
thanks in advance
best regards
Tomasz
Bookmarks