Results 1 to 3 of 3

Thread: Hareware Push Button

  1. #1
    Join Date
    Jan 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Hareware Push Button

    Hi

    I am running a embedded Qt application on a Arm board (at91sam9263) running linux. I want to use the two hardware buttons to press two corresponding push buttons on the screen. How do I link the low level hardware buttons to the application? I can find my buttons at /dev/input/event0. I can evtest event0 to show leftClick, RightClick and pressed/released etc.

    Can anyone help?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Hareware Push Button

    (This is not a Qt related question.)
    You need to be able to map these events to standard system events either to Keyboard events or Mouse Button events.
    Once you have done that, Qt will get these events from the system as the events you mapped, which you can then trap with QMouseEevet or QKeyEvent.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    mickeyk191 (6th January 2010)

  4. #3
    Join Date
    Jan 2010
    Posts
    6
    Thanks
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Hareware Push Button

    Hey

    After some time messing about with keycodes in the kernel config files I can now use my hardware buttons in my application. However I did need to run my application without X-windows as it kept intercepting my keypresses so they couldnt get to the application.

    Thanks for the help

Similar Threads

  1. A very small push button
    By Gnurou in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2009, 04:04
  2. Line edit and push button
    By dela in forum Newbie
    Replies: 1
    Last Post: 10th December 2008, 17:10
  3. shape of push button
    By Seema Rao in forum Qt Programming
    Replies: 23
    Last Post: 2nd April 2008, 02:05
  4. Push Button problem!!
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2006, 17:31

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.