diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp index 10913ef094..60b5bf4a6a 100644 --- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp @@ -354,7 +354,7 @@ void QEGLPlatformIntegration::createInputHandlers() m_kbdMgr = new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this); QEvdevMouseManager *mouseMgr = new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this); Q_FOREACH (QScreen *screen, QGuiApplication::screens()) { - QEGLPlatformCursor *cursor = static_cast(screen->handle()->cursor()); + QEGLPlatformCursor *cursor = qobject_cast(screen->handle()->cursor()); if (cursor) cursor->setMouseDeviceDiscovery(mouseMgr->deviceDiscovery()); }