[Interest] Can't grab keyboard from QWindow created with QWindow::fromWinId from HWND pointer
Nuno Santos
nunosantos at imaginando.pt
Sun Feb 28 17:39:04 CET 2016
Hi,
I'm trying to grab the keyboard input on a QWindow created with
QWindow::fromWinId from a HWND pointer, in Windows. I simply can't!
The HWND pointer is provided by another application as this windows is
supposed to appear as a Tool window of the application.
This is what I am doing:
_window = QWindow::fromWinId((WId)ptr);
_window->requestActivate();
_window->setKeyboardGrabEnabled(true);
I have also tried the following without success:
_widget = QWidget::createWindowContainer(_window);
_widget->setFocus();
_widget->grabKeyboard();
What am I missing?
Thx,
Regards,
Nuno
More information about the Interest
mailing list