[PyQt] key capture
Phil Thompson
phil at riverbankcomputing.com
Tue Jan 25 15:50:39 GMT 2011
On Tue, 25 Jan 2011 07:43:05 -0800, John Fabiani <johnf at jfcomputer.com>
wrote:
> On Tuesday, January 25, 2011 07:19:17 am Phil Thompson wrote:
>> On Tue, 25 Jan 2011 07:12:30 -0800, John Fabiani <johnf at jfcomputer.com>
>>
>> wrote:
>> > Hi,
>> > newbie question - is it possible to capture the 'F4' using SIGNAL for
a
>> > QLineEdit. If so how? Also where can I find a list of the available
>> > signals
>> > (events)?
>>
>> Signals are not events.
>>
>> If you can use a QLineEdit sub-class then reimplement keyPressEvent(),
>> otherwise install an event filter.
>>
>> Phil
>
> Thanks for the quick response. Reading the book "Rapid GUI programming
> with
> Python and QT" in the section "Signals and Slots" (page 127) the author
> starts the section by stating:
> "Every GUI library provides the details of events that take place ..."
I assume that it's using the term in its generic "something that happens"
sense, not the Qt-specific meaning.
> So I gathered that SIGNALS were events. Apparently, I did not
understand
> completely. Could you take a little more time and explain why they are
> not.
> There is more to read - chapters 10 and 11 are suppose to get deeper
into
> the
> SIGNALS and SLOTS.
I suggest you finish your reading then ask any questions you have left.
> Still would like to know where I can see a list of SIGNALS?
The documentation for a class lists the signals for that class.
Phil
More information about the PyQt
mailing list