diff --git a/src/video/cameradevice.cpp b/src/video/cameradevice.cpp index 4f1577999..ba0a7adc4 100644 --- a/src/video/cameradevice.cpp +++ b/src/video/cameradevice.cpp @@ -133,7 +133,7 @@ CameraDevice* CameraDevice::open(QString devName, VideoMode mode) } else { - QScreen* defaultScreen = static_cast(QGuiApplication::instance())->primaryScreen(); + QScreen* defaultScreen = QApplication::primaryScreen(); qreal pixRatio; #if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))