PDA

View Full Version : Buttons and focus



creep33
15th July 2010, 19:12
Hi all.

My app has three buttons on it. Call it A, B and C. When the app loads it automatically switches to mode A and I keep the button A pressed (buttona.setDown(true)). When the user clicks B the app goes to mode B, keep B pressed and so on...

Something happens and the user receives a dialog. After the dialog is closed the button is no longer held down. It is something focus related probably. How do I keep one of A, B or C always held down?

saa7_go
15th July 2010, 19:43
How about using QAbstractButton::setChecked(bool) (http://doc.trolltech.com/4.6/qabstractbutton.html#checked-prop)?

creep33
15th July 2010, 20:22
That is what I was looking for! Thnaks!