[Solved] update checkable QPushButton without toggle event
-
wrote on 10 Sept 2010, 11:16 last edited by
Hi all,
having a checkable QPushButton (with different On/Off Icons via Designer), I need to update it, triggered by an extra thread, but without producing an toggle event again as it happens with QPushButton::setChecked ...think of a download bar with progress and a Pause/Resume toggle button.
Underlying download may signal new state, I want the button state adapt to like with setChecked, but latter would raise a toggle event, that would be hard to filter from user click onto the button. -
wrote on 10 Sept 2010, 13:19 last edited by
Are you aware that you can "block signals":http://doc.trolltech.com/main-snapshot/qobject.html#blockSignals?
-
wrote on 10 Sept 2010, 15:33 last edited by
You mean QObject::blockSignals()?
no, I wasn't -- cool -- thanks!hope this works for me, if so, how can I put thread as solved?
-
wrote on 10 Sept 2010, 16:37 last edited by
Just add a "solved" tag. Others prepend a [solved] before the title of the thread.
-
wrote on 10 Sept 2010, 18:57 last edited by
found another (cleaner) option: to distinguish between clicked and toggled, former does not react to setChecked()
1/5