[Qt-interest] keyboard events
Giancarlo Amati
ilferraresebono at hotmail.it
Mon Apr 27 12:16:35 CEST 2009
Ok many thanks!!
GC.
> From: sean.harmer at maps-technology.com
> To: qt-interest at trolltech.com
> Date: Mon, 27 Apr 2009 11:11:20 +0100
> Subject: Re: [Qt-interest] keyboard events
>
> On Monday 27 April 2009 11:04:17 Giancarlo Amati wrote:
> > Hello,
> > sorry to bother everybody with this "silly" question but I can't find
> > anything adressing me to the keyboards event management: I have a
> > CMainWindow derived from QMainWindow class. now, I want connect my class to
> > the keyboard events. So I'll call:
> >
> > QObject::connect(this,SIGNAL(keyPressEvent(QKeyEvent
> > *)),this,SLOT(getKeyboardPressed(QKeyEvent *)) );
> >
> > where this is the pointer to an object beloging to CMainWindow class. Now,
> > what happens is that I received a warning message saying that there is now
> > keyPressEvent method decleared...how? I've checked the QWidget class and
> > actually there is one :(
> Yes there is a keyPressEvent() method but it is *not* a signal. Instead simply
> override this virtual function and do your handling in there. You may wish to
> re-read the signals/slots docs.
>
> Cheers,
>
> Sean
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
_________________________________________________________________
È arrivato il nuovo Messenger! Provalo subito
http://clk.atdmt.com/GBL/go/140630370/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090427/ddeafdb3/attachment.html
More information about the Qt-interest-old
mailing list