Results 1 to 2 of 2

Thread: Changing focus/selection in QtEmbedded with custom input device.

  1. #1
    Join Date
    Sep 2010
    Posts
    28
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Changing focus/selection in QtEmbedded with custom input device.

    I have a QtEmbedded application with 8 QPushButtons arranged in a 2x4 matrix. I need to be able to move focus between the buttons, and to check them. My embedded system doesn't have keyboard or mouse, but a custom input device. Based on the input I send up/down/right/left/ok-messages to my GUI, but I'm not sure what to do with them.

    Today I use them to generate KeyEvents that I send to my MainWindow. I have set tab order in QtCreator, and using the up/down keys I'm able to move focus. I have not been able to make Qt:Key_Space check a button, though it does just that on my x86-build. I want to be able to use right/left to move between colums as well, and I have no idea how to accomplish that.

    I guess an alternative would be to write my own state machine to move focus and check buttons, but if Qt can do much if this job for me, I'd rather not.

    Any advice? I'm fairly certain I'm not the first one with this kind of system, so I suspect there's a Known Good Way out there

  2. #2
    Join Date
    Sep 2010
    Posts
    28
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Changing focus/selection in QtEmbedded with custom input device.

    * delayed bump *

    I'm revisiting this problem now. I've made stuff work by sending the joystick events to the visible views, and emitting KeyEvents to the widgets I want. This makes my app have a bunch of messy joystick-handling all over the place. I would like to have a central joystickdriver that emits events to my application and lets Qt take care of telling the focused widgets to "do the right thing".

    Is this a good idea, and Should It Work?

Similar Threads

  1. QtEmbedded TouchScreen Input Methods
    By QbelcorT in forum Newbie
    Replies: 0
    Last Post: 23rd November 2008, 07:43
  2. Replies: 0
    Last Post: 18th October 2008, 23:01
  3. Help! Program dead when changing input methed
    By vencent in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2008, 11:55
  4. QGraphicsItem and focus for key input
    By fossill in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2007, 19:13
  5. How Qt/Embedded detects the keypad input from device?
    By mahe2310 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 4th April 2006, 07:08

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.