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. KeyPressEvent singleTime ?
Forum Updated to NodeBB v4.3 + New Features

KeyPressEvent singleTime ?

Scheduled Pinned Locked Moved Solved General and Desktop
keypresseventevent
5 Posts 2 Posters 1.8k Views 2 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.
  • W Offline
    W Offline
    Walux
    wrote on last edited by Walux
    #1

    Hi Qt Community :)

    I'm looking for an answer i'm afraid it can be obvious .

    After maintining the press on a certain key , everyone notices that the keyPressEvent needs a short amount of time before it goes on a loop .

    I want my KeyPressEvent to either be singleTime (even when maintining the press) or to be looped instantly .

    How do i do that ?

    Thanks for your comprehension :)

    Taking things from beginning to end : That's my entertainment !

    1 Reply Last reply
    0
    • W Offline
      W Offline
      Walux
      wrote on last edited by
      #2

      Or a KeyEvent that only catches holding down keys :)

      Taking things from beginning to end : That's my entertainment !

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

        Hi
        Maybe you could look at
        QKeyEvent::isAutoRepeat()
        and if true ignore key.

        That way it will be "single time" .

        W 2 Replies Last reply
        3
        • mrjjM mrjj

          Hi
          Maybe you could look at
          QKeyEvent::isAutoRepeat()
          and if true ignore key.

          That way it will be "single time" .

          W Offline
          W Offline
          Walux
          wrote on last edited by
          #4

          @mrjj

          I think i got your point , but would you mind giving me a short code for ignoring key when it's autoRepeat ?

          Taking things from beginning to end : That's my entertainment !

          1 Reply Last reply
          0
          • mrjjM mrjj

            Hi
            Maybe you could look at
            QKeyEvent::isAutoRepeat()
            and if true ignore key.

            That way it will be "single time" .

            W Offline
            W Offline
            Walux
            wrote on last edited by
            #5

            @mrjj

            It's alright , i figured it out ;)

            Huge thanks for your help :)

            Topic->setAsClosed(true);

            Taking things from beginning to end : That's my entertainment !

            1 Reply Last reply
            1

            • Login

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