diff --git a/3rdparty/macdeployqt/shared.cpp b/3rdparty/macdeployqt/shared.cpp index 77c71fec3..074864535 100644 --- a/3rdparty/macdeployqt/shared.cpp +++ b/3rdparty/macdeployqt/shared.cpp @@ -1427,9 +1427,11 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf LogNormal() << "QML module search path(s) is" << qmlImportPaths; // Use qmlimportscanner from QLibraryInfo::LibraryExecutablesPath - QString qmlImportScannerPath = - QDir::cleanPath(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) - + "/qmlimportscanner"); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath) + "/qmlimportscanner"); +#else + QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) + "/qmlimportscanner"); +#endif // Fallback: Look relative to the macdeployqt binary if (!QFile(qmlImportScannerPath).exists())