Or in its root QQuickItem .

The point is to accept keystrokes at the qml level , since a number of functions have already been created there, but if the window is not in focus (for example, the touchscreen was split and there is no way to poke into the window), it does not accept the keystrokes that trigger them (although “generally” keys are accepted, but they don’t go into qml, and reworking the whole problem there is processing combinations of pressing one and releasing other keys, so transferring the focus would be the easiest solution, but QWindow didn’t find any function in the QQuickView or QWindow documentation. Found the property ActiveFocus, but it it turned out readonly.

Among the flags ( setFlags ) did not find anything suitable either.

  • Can QWindow::requestActivate() ? - alexis031182
  • @ alexis031182 not, something did not work. On the window system, but with the Qt :: BypassWindowManagerHint flag set, it also does not work (if clicked, only then) - asianirish
  • Something is nothing more. Is that raise() before requestActivate() try to do. For Windows, there are even special setWindowActivationBehavior() , but for Linux for some reason nothing more. - alexis031182
  • @ alexis031182 either. It seems to be based on a window manager inside. Dig a level lower - asianirish

0