Results 1 to 2 of 2

Thread: QPushbutton vs QkeyEvent

  1. #1
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QPushbutton vs QkeyEvent

    i have two button example button1,button2.
    when i click button1,it start to display first image after i press right key by using keypressevent the next image shuld display.my problem is after clicking button1 the first image dispalyed,after that when i press right key the image not displayed,key event not executing.so i removed button and directly i displayed first images after i pressed rightkey the next image was displayed,when i use button keyevent not executing to me what am doing wrong??
    please guide me Qt experts.
    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QPushbutton vs QkeyEvent

    make sure the widget you've implemented the key event handling in has the focus.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    iswaryasenthilkumar (12th June 2015)

Similar Threads

  1. Something about the QKeyEvent in Qt3
    By cspp in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2009, 02:38
  2. Overwrite QKeyEvent
    By haldrik in forum Qt Programming
    Replies: 3
    Last Post: 8th November 2008, 19:43
  3. QKeyEvent
    By peace_comp in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2008, 13:13
  4. QKeyEvent
    By sonuani in forum Newbie
    Replies: 8
    Last Post: 25th February 2008, 07:38
  5. what's mean of the member of QKeyEvent
    By sunote in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2007, 21:25

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.