Why nativeEvent can not receive WM_CHAR message?
-
@SGaist Hi,
Because I want to combine qt widget with cef under cef off-screen mode. My project must be compatible with windows xp, so I can not use QWebEngineView. Cef needs MSG struct, but I don't know how to transfer QKeyEvent* to MSG*, so QKeyEvent seems to be useless. -
@SGaist Hi,
Because I want to combine qt widget with cef under cef off-screen mode. My project must be compatible with windows xp, so I can not use QWebEngineView. Cef needs MSG struct, but I don't know how to transfer QKeyEvent* to MSG*, so QKeyEvent seems to be useless.but I don't know how to transfer QKeyEvent* to MSG*, so QKeyEvent seems to be useless.
If you're saying that would solve your need, why can you not do that? IIRC a
MSGstructhas only about 4 fields, are they not equatable to what you can have in aQKeyEvent? -
You'll need a native event filter. But first take a look at this Qt bug report.
-
but I don't know how to transfer QKeyEvent* to MSG*, so QKeyEvent seems to be useless.
If you're saying that would solve your need, why can you not do that? IIRC a
MSGstructhas only about 4 fields, are they not equatable to what you can have in aQKeyEvent? -
@JonB
I find the fields in a MSG struct are not equatable to what I can have in a QKeyEvent. -
You'll need a native event filter. But first take a look at this Qt bug report.
-
@SGaist I have install the native event filter, but it also only receive WM_KEYDOWN and WM_KEYUP message in nativeEventFilter(), without WM_CHAR message.
-
@SGaist I have install the native event filter, but it also only receive WM_KEYDOWN and WM_KEYUP message in nativeEventFilter(), without WM_CHAR message.
-