In Qt5, the function for processing native Windows messages is:
bool QWidget::nativeEvent(const QByteArray &eventType, void *message, long *result)
and the documentation says, that the third parameter means LRESULT
on Windows. In Qt6, the parameter was changed to qintptr
:
bool QWidget::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
Now you can properly pass 64-bit LRESULT
using 64-bit qintptr
. But what should be done on Windows x64 with 32-bit long
in Qt5?
I have a custom MessageHandler
which returns various 8-byte pointers using its LRESULT
, so the call *result = SendMessage(...)
from nativeEvent
stores the truncated result.