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.
QWindow::requestActivate()? - alexis031182raise()beforerequestActivate()try to do. For Windows, there are even specialsetWindowActivationBehavior(), but for Linux for some reason nothing more. - alexis031182