I've written a program with different functions in Qt. Now I want to make a Gui. For example I have two buttons, button1 and button2. I open the application, i see button1 first. Then I click button1, it executes its function (like "start") and disappears. Then button2 should appear and when I click button2 it executes its function (like "stop") and disappears and button1 shows up again to be clicked to execute start. My question now is, how to solve this in an easy way?
void gui::on_pushButton_clicked()
{
//execute start, switch to be button2
}
void gui::on_pushButton_2_clicked()
{
//execute stop, switch to be button 1
}