Frage

I have a start/stop button which i want to control which tab is being shown in the tabWidget.

here's how I'm doing it.

// Control START/STOP actions
void gui::start_stop()
{
    if (acquisition == 0)
    {
        acquisition = 1;
        ui->pushButton->setText("STOP \nACQUISITION");
        ui->pushButton->setStyleSheet("background-color: #8090d0; border-radius: 5px; color : #ffffff;");
        ui->tab_acquisition->raise();

    }

    else
    {
        acquisition = 0;
        ui->pushButton->setText("START \nACQUISITION");
        ui->pushButton->setStyleSheet("background-color: #6673a6; border-radius: 5px; color : #ffffff;");
        ui->tab_settings->raise();

    }
}

the problem is that the tab_acquisition and tab_settings don't get raised

thanks

War es hilfreich?

Lösung

You are supposed to tell us if you have issues with this method, if you try to connect it to the clicked signal make sure it's declared with slots access specifier.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top