On 09/07/13 17:03, Giuseppe Corbelli wrote:
On 07/07/2013 11:51, Phil wrote:
Thank you for reading this.

How to I access my toggle button slot without clicking on the button?
For example:

if hr == 19:
# this button is accessible
self. on_pushButton_clicked()

# this fails because checked is not defined
self.on_ledButton_toggled(checked)

self.pushButton.click() should do.

Thanks Giuesppe, I appreciate your reply.

This is how I overcame the problem a couple of hours after I posted my question:

self.ledButton.setChecked(True)

ledButton is a toggle button.

--
Regards,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to