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. Key up pressed event
Forum Updated to NodeBB v4.3 + New Features

Key up pressed event

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 1.3k Views 3 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.
  • A Offline
    A Offline
    ARASHz4
    wrote on last edited by A Former User
    #1

    Hi
    i want when key up in keyboard is pressed do something

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

      So do it ?
      Override keyReleaseEvent
      void MyWidget::keyReleaseEvent(QKeyEvent *event)
      {
      // do here what you want
      }

      Edit:
      what is "up" key?`
      U can also trigger your code from keyPressEvent if the up part is not referring to releasing a key but
      the arrow key pointing up.

      http://www.informit.com/articles/article.aspx?p=1405544

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi! You can find some example code here: https://forum.qt.io/topic/74169

        1 Reply Last reply
        3
        • A Offline
          A Offline
          ARASHz4
          wrote on last edited by
          #4

          how about multi key pressed like Ctrl+O ?

          raven-worxR 1 Reply Last reply
          0
          • A ARASHz4

            how about multi key pressed like Ctrl+O ?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @ARASHz4 said in Key up pressed event:

            how about multi key pressed like Ctrl+O ?

            All you need is contained in the QKeyEvent object you get when you receive the event.
            I suggest you read some starter tutorials for Qt first, since such things are very essential to even start building a GUI application.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            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