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

Keypressevent focus window

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 722 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.
  • R Offline
    R Offline
    rinwinte
    wrote on last edited by
    #1

    Hello

    I try to make a program that reads all the keyboard inputs. But now at first i only can read special caracters like enters and after a first enter i can read other keypresses. (the event wont activate before the enter)

    when i push a button at the window and then try to read characters it works fine. But if i go to another window and back to the program it doesnt work anymore until i push the button again.

    so i think it has something to do with active window. How can i resolve this

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

      Hi
      Since you are not telling how you did it, it can be many things.

      Have a look at this. it uses a global event filter. Might be of use to you.

      http://stackoverflow.com/questions/8009676/mapping-key-press-event-qt

      Remember to install it as eventFilter

      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