Leandros
Leandros

Reputation: 16825

Qt Fullscreen Window hiding Win8/10 touch keyboard

I'm currently trying to keep the Windows Touch Keyboard (TabTip.exe) over a fullscreen Qt QML application.

Unfortunately, after showing (and forcing it to be on top) it's dismissed again.

It does not matter if I start the keyboard before starting the application or while running the application in fullscreen, after Qt is gaining focus, the keyboard is behind.

Any ideas what this could cause? Is this a Qt or Windows issue?

Upvotes: 1

Views: 763

Answers (1)

SteveTJS
SteveTJS

Reputation: 705

I found a way to keep the Windows keyboard above my QML "fullscreen" application. What I noticed is that in non fullscreen application, the keyboard appears well above my QML application. So the idea was to simulate a fullscreen application giving the window application nearly the size of the screen. Some code will be better:

ApplicationWindow {
  id: mainWindow

  x: 0
  y: 0
  width: Screen.width
  height: Screen.height + 1 //+1 because does not work if the window size is equal to screen resolution. In some way, it considers it's a real fullscreen application and the keyboard stays behind.

  flags: Qt.FramelessWindowHint | Qt.Window //first flag to remove top right buttons such as close button, second flag to keep the application thumbnail in the Windows taskbar to close it if necessary.

  visible: true
  ...
}

With that, I can open the Windowd keyboard clicking on a text field, close it, re open it, ... all that I want!

Upvotes: 1

Related Questions