QTimer and PyQt

Jim tiredofspam at anyaccount.com
Tue Jul 20 15:10:32 EDT 2004


Phil Thompson wrote:
> On Tuesday 20 July 2004 12:41 pm, Adrian Casey wrote:
>> 2.  At timeout, check if any fields have changed (using the isChanged()
>> method.) and if so, reset the timer.

> For 2., you would have to iterate over each widget.

Most input widgets emit a signal when their value changes ("textChanged",
"currentChanged", "valueChanged", "clicked", etc). You could connect all of
the signals from the widgets to a single slot which resets the timer.

See both the Qt and PyQt docs on signals and slots.

I liked the suggestion about revalidating the user when the user presses
"ok" better though.

Jim




More information about the Python-list mailing list