[Qt-interest] keyboard event

ri at eeda.denso.co.jp ri at eeda.denso.co.jp
Mon Apr 20 07:15:38 CEST 2009


I think you are trying to capture the shift + A  keyPressEvent
 
So you can do it like this:
 
 
void YouClass::keyPressEvent( QKeyEvent *event ) {
 
    if( event->modifiers() == Qt::ShiftModifier ) {
        if( event->key() == Qt::Key_A ) {
 
            // do your stuff here
 
        }
    }
 
}
 
hope it helps
 
Mizuki Shinichi
 
 
________________________________

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of ami guru
Sent: Sunday, April 19, 2009 3:27 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] keyboard event


 Hello forum,

Is there any way to separate the uppercase and lowercase in the keypress event?


In  the manual i find there is only 




Qt::Key_A and so forth that only represent the uppercase 





is there any thing like Qt::Key_a ?







Thanks 


Sajjad


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/1681fe61/attachment.html 


More information about the Qt-interest-old mailing list