Results 1 to 3 of 3

Thread: How to respond the reallty button?

  1. #1
    Join Date
    Sep 2009
    Posts
    14
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default How to respond the reallty button?

    Hi, everyone?
    I run qt-core on the arm9 board and I connect a really button to the board. And the button driver code is ok. And I want to ask how to do to realize that when I click the really button and qt will connect to a slot just like the pushbutton?
    Because I want to use two method the control the slot, one is using the pushbutton(it is easy to realize just use signal and slot); the other is using really button, when I click the button, the qt can do the same thing just like I click pushbutton in the interface. How to realize that , thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to respond the reallty button?

    What is a "really button"?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    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: How to respond the reallty button?

    I think he means a hardware button, such as on a phone or similar - since this is probably embedded (runs on ARM).

    @anson97209
    You can achieve what you want by using QKeyEvet.
    You will have to know what key code your button has.
    If you don't you can output the key code in the keyPressEvent().
    ==========================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.

Similar Threads

  1. How to respond the reallty button?
    By anson97209 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 15th October 2009, 12:08
  2. button background color when it is clicked
    By navi1084 in forum Qt Programming
    Replies: 4
    Last Post: 9th December 2008, 15:02
  3. button with backgr and icon using stylesheets
    By s_p_t10 in forum Qt Programming
    Replies: 0
    Last Post: 7th May 2008, 20:19
  4. problem about mouse button events
    By vql in forum Qt Programming
    Replies: 1
    Last Post: 29th April 2008, 10:14
  5. question about button
    By narumi in forum Newbie
    Replies: 2
    Last Post: 21st January 2008, 05:44

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.