Commit 7b31f501 authored by Roger Bramon's avatar Roger Bramon
Browse files

Fix QVTKWidget problem on Windows with Aero off and Qt5

In Qt 5.0, QWidget::winEvent has been replaced to QWidget::nativeEvent.
Therefore, the problem solved in 0a0b43ed can still be reproduced when linking VTK against Qt5.

This commit fixes the problem also when linking against Qt5.

Change-Id: I0b94e76f6f80dc2afccbe5b263770c27ddba60c2
parent 9257513a
......@@ -823,6 +823,17 @@ bool QVTKWidget::winEvent(MSG* msg, long*)
}
return false;
}
#if QT_VERSION >= 0x050000
bool QVTKWidget::nativeEvent(const QByteArray& eventType, void* message, long* result)
{
if (eventType == "windows_generic_MSG")
{
winEvent((MSG*)message, result);
}
return false;
}
#endif
#endif
#if defined (QVTK_USE_CARBON)
......
......@@ -250,6 +250,11 @@ protected:
#if defined(Q_OS_WIN)
bool winEvent(MSG* msg, long* result);
#if QT_VERSION >= 0x050000
bool nativeEvent(const QByteArray& eventType, void* message, long* result);
#endif
#endif
#if defined(QVTK_USE_CARBON)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment