void Classy::on_checkBox_pressed()
{
qDebug() << "Box Pressed";
layout->addWidget(stackedWidget);
stackedWidget->setCurrentWidget(sickWidget);
//stackedWidget->setLayout(layout); // This should not be done, layout of stackedWidget is managed internally by QStackedWidget.
//stackedWidget->show(); // Need not show this directly, just show the top level widget which contains the stackedWidget.
}
void Classy::on_checkBox_pressed()
{
qDebug() << "Box Pressed";
layout->addWidget(stackedWidget);
stackedWidget->setCurrentWidget(sickWidget);
//stackedWidget->setLayout(layout); // This should not be done, layout of stackedWidget is managed internally by QStackedWidget.
//stackedWidget->show(); // Need not show this directly, just show the top level widget which contains the stackedWidget.
}
To copy to clipboard, switch view to plain text mode
Bookmarks