Results 1 to 2 of 2

Thread: Please help me handling UP and DOWN key in my class?

  1. #1
    Join Date
    Sep 2013
    Posts
    33
    Thanks
    5
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Exclamation Please help me handling UP and DOWN key in my class?

    void DgEzChannelView::keyPressEvent(QKeyEvent* e)
    {

    if( e->key() == Qt::Key_Up ) { do stuff; }
    else if( e->key() Qt::Key_Down ) { do stuff; }
    }
    ======================
    this is getting event for each every key pressed except up,down,right,left arrow key.May be QT core application is filtering the events before sending to my class. plz help how to get the events of these 4 keys from key board.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Please help me handling UP and DOWN key in my class?

    Which class does DgEzChannelView inherit?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. show object (scene) in widget in class class mainwindow
    By rimie23 in forum Qt Programming
    Replies: 8
    Last Post: 1st May 2012, 16:15
  2. Replies: 1
    Last Post: 20th January 2012, 04:39
  3. Replies: 7
    Last Post: 18th August 2011, 14:43
  4. Replies: 3
    Last Post: 27th December 2008, 19:34
  5. Replies: 3
    Last Post: 16th May 2007, 11:07

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.