[PyQt] Accessing a toggle button without clicking on it

Giuseppe Corbelli giuseppe.corbelli at copanitalia.com
Tue Jul 9 08:03:16 BST 2013


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.

-- 
             Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666318  Fax: +390302659932
E-mail: giuseppe.corbelli at copanitalia.com


More information about the PyQt mailing list