
Originally Posted by
seerofsorrow
... Thoughts?
You need to work on your C++ skills.
See if this helps you understand your problem
- Make layout, stackedWidget, sickWidget and nfsWidget as member variable of Classy.
- Initialise layout, stackedWidget, sickWidget and nfsWidget in Classy constructor
- layout.addWidget(stackedWidget); // Move this to Classy constructor
- then try this code
void Classy::on_checkBox1_pressed()
{
stackedWidget->setCurrentWidget(sickWidget);
}
void Classy::on_checkBox2_pressed()
{
stackedWidget->setCurrentWidget(nfsWidget);
}
void Classy::on_checkBox1_pressed()
{
stackedWidget->setCurrentWidget(sickWidget);
}
void Classy::on_checkBox2_pressed()
{
stackedWidget->setCurrentWidget(nfsWidget);
}
To copy to clipboard, switch view to plain text mode
Bookmarks