Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I need Help! please! Emulator Arrow keys
Qt 6.11 is out! See what's new in the release blog

I need Help! please! Emulator Arrow keys

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    samlion007
    wrote on last edited by
    #1

    I want to do an emulator Arrow Keys to chose any Button on the same window, Please see the Photo, which i attached. Any Idead!!http://cdn04.trixum.de/upload2/105400/105383/1/1d37e421c3ef444a2acc69b47fd9ec231.jpg(Arrow Keys)!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean like the classic asdw keys in games ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rondog
        wrote on last edited by
        #3

        Unless I misunderstand this it shouldn't be too difficult.

        Create an array of buttons (say 26, broken into 5 rows, one row with only two buttons). The buttons are put into a grid layout according to how you want to set this up.

        The index of the active button will decide which one to decorate when it is re-drawn. Some sort of custom paint event to handle this would probably be the best.

        The Left/Right increment or decrement the active button index by 1.

        The Up/Down increment or decrement the index by the nominal number of buttons in a row (6 in the above example).

        Just make sure the index stays within the range (not less than zero or greater than the max index - 25).

        You would over-ride the keypressEvents() to capture this the keys.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          samlion007
          wrote on last edited by
          #4

          Hallo SGaist,

          thanks alot for your answer, you are maybe right, i mean as remote control, there is many buttons, radioButton, time, lineEdite and others on the same Window and there is a Arrow keys.

          What i want it is to change date or name or any thing only throught this Arrow keys.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            samlion007
            wrote on last edited by
            #5

            Hallo Rondog,

            thanks alot for your answer, your Idea is very good, but if i have some lineEdit or Radiobutton it would be diffecult.

            On the Window i should be able to set the time and change it and like this.
            I am looking for good Idea for all Widgets.

            regards

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved