Make MainWindow::nativeEvent compatible with Qt 6

This commit is contained in:
Jonas Kvinge
2020-07-18 04:15:42 +02:00
parent a101252701
commit 1f0961d574
2 changed files with 8 additions and 0 deletions

View File

@@ -2537,7 +2537,11 @@ void MainWindow::Raise() {
activateWindow();
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result) {
#else
bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, long *result) {
#endif
Q_UNUSED(eventType);
Q_UNUSED(result);

View File

@@ -112,7 +112,11 @@ class MainWindow : public QMainWindow, public PlatformInterface {
protected:
void keyPressEvent(QKeyEvent *event) override;
void closeEvent(QCloseEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
#else
bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
#endif
// PlatformInterface
void Activate() override;