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. Is there any way to block the keyPressEvent event on the keyboard?Is there a switch method?
QtWS25 Last Chance

Is there any way to block the keyPressEvent event on the keyboard?Is there a switch method?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 287 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.
  • C Offline
    C Offline
    canid
    wrote on last edited by
    #1

    Is there any way to block the keyPressEvent event on the keyboard?Is there a switch method?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      No, but what do you want to achieve?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        No, but what do you want to achieve?

        C Offline
        C Offline
        canid
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        I want to do permission control, respond to keyboard events when the conditions are met, and do not respond if the conditions are not met

        Pl45m4P 1 Reply Last reply
        0
        • C canid

          @Christian-Ehrlicher
          I want to do permission control, respond to keyboard events when the conditions are met, and do not respond if the conditions are not met

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @canid

          I dont know / tested if it works but you could try to install an event filter and ignore some key events on your form and let other keys through


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          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