Qt全屏窗口隐藏Win8 / 10触摸键盘

时间:2016-12-14 14:25:42

标签: windows qt qml

我目前正试图将Windows Touch键盘(TabTip.exe)保留在全屏 Qt QML应用程序上。

不幸的是,在显示(并强迫它在顶部)后,它再次被解雇。

如果我在启动应用程序之前启动键盘或在全屏运行应用程序时无关紧要,在Qt获得焦点后,键盘就会落后。

任何想法可能会导致什么?这是Qt还是Windows问题?

1 个答案:

答案 0 :(得分:1)

我找到了一种使Windows键盘保持在QML“全屏”应用程序上方的方法。我注意到的是,在非全屏应用程序中,键盘显示在我的QML应用程序上方。因此,该想法是模拟一个全屏应用程序,使窗口应用程序几乎具有屏幕的大小。一些代码会更好:

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
  ...
}

这样,我可以打开窗口键盘,单击一个文本字段,将其关闭,然后重新打开,...所有我想要的!