Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

'If' does not work

$
0
0
Hi, I’m trying to do a IF-Query in my QT Creator 5.0.2 (and the Designer). Here’s my code for mainwindow.cpp: #include "mainwindow.h" #include "ui_mainwindow.h"       MainWindow::MainWindow(QWidget *parent) :     QMainWindow(parent),     ui(new Ui::MainWindow)   {     ui->setupUi(this);       if (ui->comboBox->currentText() == "Digital IO")         ui->pushButton->setVisible(false);     else         ui->pushButton->setVisible(true); }   MainWindow::~MainWindow() {     delete ui; } When I change the combobox item, nothing happens with the button. Help?

Viewing all articles
Browse latest Browse all 18427

Trending Articles