Open emmenlau opened 2 years ago
@emmenlau I recommend that you also create a copy of this issues in QT
And sorry I can't help you because I don't know qt.
Dear @lindexi , thanks for the quick response!
But I do not think the problem is specific to Qt. Or how can it be? The overloaded methods should be called from WPF, not from Qt, or am I on the wrong track?
Anyone?
@emmenlau Probably very few friends can answer that question.
Oh my, that is very unfortunate! I'm under the impression that the embedding of native widgets does not fully work, but there seems to be nobody that can help. Is there some way this could be escalated to the relevant people?
@emmenlau including a project people can run and reproduce the issue with might help
@emmenlau - Please provide a minimal repro for us to check this further
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? I don't know
Problem description:
I have a native window created in Qt with Qt Widgets. I embed the window in WPF with the help of a class derived from HwndHost. The embedding works and I can see the widget, and basic mouse interaction also works. However I would want to receive further events, for example keyboard events. Also I would like the
DestroyWindowCore
method to be called. But I can get neither of this to work. In my understanding, a good start for keyboard support would be to getWndProc
orOnGotKeyboardFocus
working, but I fail to see how to proceed...Any help would be greatly appreciated!
I have the following override method that works:
And I have the following overrides that never get called, not on key presses, not on mouse interaction, not on closing the application, never (checked with logging, and with the coreclr debugger):
Actual behavior:
The override methods are not called.
Expected behavior:
The override methods are called.
Minimal repro:
This is my WPF HwndHost container window. In this I place a QWidget that is rendered from a separate thread, the Qt UI thread. The widget works and behaves correctly but never gets keyboard focus, and none of my override methods are called.