From e674154a2064a04a6812b1ce860dba4199606918 Mon Sep 17 00:00:00 2001 From: pjx206 Date: Fri, 5 Mar 2021 15:36:53 +0800 Subject: [PATCH] Fix nativeEvent() to support Qt6 --- qwinwidget.cpp | 2 +- qwinwidget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qwinwidget.cpp b/qwinwidget.cpp index f27c5f4..5868baa 100644 --- a/qwinwidget.cpp +++ b/qwinwidget.cpp @@ -314,7 +314,7 @@ void QWinWidget::onCloseButtonClicked() } } -bool QWinWidget::nativeEvent(const QByteArray &, void *message, long *result) +bool QWinWidget::nativeEvent(const QByteArray &, void *message, qintptr *result) { MSG *msg = (MSG *)message; diff --git a/qwinwidget.h b/qwinwidget.h index f79aa2b..f8962ce 100644 --- a/qwinwidget.h +++ b/qwinwidget.h @@ -83,7 +83,7 @@ public slots: bool focusNextPrevChild(bool next) override; void focusInEvent(QFocusEvent *e) override; - bool nativeEvent(const QByteArray &eventType, void *message, long *result) override; + bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override; private: