Hi there,
I'm using QPushButton like a checkbox , so is there any event about Checked state changed in QPushButton thanks for your help.
Hi there,
I'm using QPushButton like a checkbox , so is there any event about Checked state changed in QPushButton thanks for your help.
QPushButton::ischecked() function
isChecked() returns checked state of QPushButton. I wanna catch event everytime changed state of qpushbutton like checkboxs stateChanged(int ) event. thanks ...
Hm... was looking through documentation found something called QWidget::changeEvent...
thx Archa4 but it's not for checked stateChanged ...
Did you try the toggle signal?
http://doc.qt.nokia.com/4.7-snapshot...on.html#toggle
Thanks Rhayader , I just override void QAbstractButton::toggled ( bool checked ) [signal] but it doesn't work, btw my buttons in QButtonGroup , but as document said it works in QButtonGroup but doesn't work as i said ...
You don't need to override the signal. It's a signal. Connect it to a Slot.
http://www.qtcentre.org/faq.php?faq=qt_signalslot........... I think this will help you
i need to override for check something then i emit signal. samething actually (;, still doesn't work btw ...
edit : I typed mistakely slot there ! so this is my mistake many people confused then![]()
Last edited by nightroad; 21st March 2011 at 11:05.
You don't emit a slot.
Connect the toggled signal to a slot and then check what you have to check ?
Then include your codes in the another function and call Q_Emit, it will trigger it
Bookmarks