/WindowWithoutFocus

create a window with Qt that will not steal the focus of other running applications but only can accept mouse events

Primary LanguageC++GNU General Public License v3.0GPL-3.0

WindowWithoutFocus

create a window with Qt that will not steal the focus of other running applications but only can accept mouse events


How to test the program

  • Step 1

    run a text program such as notepad
  • Step 2

    launch your application(In this step, your app can start with focus, that's not a big deal) and have "topmost" set to true
  • Step 3

    click the notepad to transport the focus to it so it can get the cursor blinking in its text area
  • Step 4

    click one button on your application without stealing the focus from notepad

Success or Failure

if your app can work without any problem while you tapping any key the corresponding letters can apper in the text field, congratulations!