diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 5f5639a1cf..e9e5865a84 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -42,8 +42,11 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri module_libs = "\$\$QT_MODULE_HOST_LIB_BASE" else: \ module_libs = "\$\$QT_MODULE_LIB_BASE" - !isEmpty(QT_PRIVATE): \ - module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)" + # In addition to the library's private deps, the private module's deps + # are logically runtime deps of the public module. + runtime_deps = $$QT_PRIVATE $$QT_FOR_PRIVATE + !isEmpty(runtime_deps): \ + module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(runtime_deps, -private$, _private)" else: \ module_rundep = module_build_type = v2