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. Keyboard Events
Qt 6.11 is out! See what's new in the release blog

Keyboard Events

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 642 Views
  • 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.
  • PythonShinobiP Offline
    PythonShinobiP Offline
    PythonShinobi
    wrote on last edited by
    #1
    This post is deleted!
    C 1 Reply Last reply
    0
    • PythonShinobiP PythonShinobi

      This post is deleted!

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @PythonShinobi said in Keyboard Events:

      How do I fix it?

      You are going to have to share at least some of what"it" currently is.

      1 Reply Last reply
      3
      • PythonShinobiP Offline
        PythonShinobiP Offline
        PythonShinobi
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • PythonShinobiP Offline
          PythonShinobiP Offline
          PythonShinobi
          wrote on last edited by
          #4
          This post is deleted!
          C 1 Reply Last reply
          0
          • PythonShinobiP PythonShinobi

            This post is deleted!

            C Offline
            C Offline
            ChrisW67
            wrote on last edited by
            #5

            @PythonShinobi said in Keyboard Events:

            def keyPressEvent(self, e):
            if e.key() == Qt.Key_Space:
            self.onKeyClicked('Space')
            elif e.key() == Qt.Key_Backspace:
            print(0)

            This does something when a space or backspace is pressed and nothing for any other key event received. By default this event handler accepts every QKeyEvent it receives, so no other processing will occur for key strokes.

            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