Hello.
Sometimes I would like to programmatically set a button down and keep it in a pushed state. This has no other than visual reasons, it shows that there is a process running that can be stopped by the same button that started it.
I just discovered that it actually doesn't work.
Qt Code:
void MyWidget::on_Button_clicked() { if (ui.Button->isDown()) return; ui.Button->setDown(true); }To copy to clipboard, switch view to plain text mode
After I click the button, it stays down like it should. But when the button loses focus, it comes back up. Another thing is that despite the check if the button is down already, wild clicking can also bring it back up again. Is there anything I can do about this? I know I could disable a button instead of downing it, but I'm already using that for when a button should be really disabled.
Bookmarks