Hello everybody!
I am new to QT, probably i'm missing some basic concept, i wrote a simple demo app (windows/mingw), i am trying to change caption on push button, it works for the first time, but if i'm trying to set old value after that - it doesn't. Here are some examples:
this->ui.pushButton->setText("1");
this->ui.pushButton->setText("2");
this->ui.pushButton->setText("3");
this->ui.pushButton->setText("1");
this->ui.pushButton->setText("2");
this->ui.pushButton->setText("3");
To copy to clipboard, switch view to plain text mode
this works fine, the value displayed on button is "3".
this->ui.pushButton->setText("1");
this->ui.pushButton->setText("2");
this->ui.pushButton->setText("1");
this->ui.pushButton->setText("1");
this->ui.pushButton->setText("2");
this->ui.pushButton->setText("1");
To copy to clipboard, switch view to plain text mode
This example doesn't work as i expect - the displayed value on the button is "2".
similar situation with other properties, for example:
this->ui.spinBox->setEnabled(true);
this->ui.spinBox->setEnabled(false);
this->ui.spinBox->setEnabled(true);
this->ui.spinBox->setEnabled(true);
this->ui.spinBox->setEnabled(false);
this->ui.spinBox->setEnabled(true);
To copy to clipboard, switch view to plain text mode
the element stays in "disabled" state.
i tryed to call update() after each property change for the particular element - that didn't help.
Any suggestions? what am i missing here?
Thank you all in advance.
Bookmarks