diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index c49a41581f..aee95295e8 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -11,11 +11,18 @@ isEmpty(QMAKE_QT_MODULE)|!exists($$QMAKE_QT_MODULE) {
    !exists($$QMAKE_QT_MODULE):exists($$[QT_INSTALL_DATA]/mkspecs/qmodule.pri):QMAKE_QT_MODULE = $$[QT_INSTALL_DATA]/mkspecs/qmodule.pri
 }
 
-!exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
-   error("Cannot load qmodule.pri!")
+!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\.pri) {
+    !exists($$QMAKE_QT_MODULE)|!include($$QMAKE_QT_MODULE, "", true) {
+        error("Cannot load qmodule.pri!")
+    } else {
+        QMAKE_QT_MODULE_PRI_LOADED = 1
+        debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
+    }
 } else {
-   debug(1, "Loaded qmodule.pri from ($$QMAKE_QT_MODULE)")
+    QMAKE_QT_MODULE_PRI_LOADED = 1  # covers 'preloading' from .qmake.cache
+    debug(1, "Not loading qmodule.pri twice")
 }
+
 mac {
    !isEmpty(QMAKE_RPATHDIR){
        CONFIG += absolute_library_soname
diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf
index 55c578fb8d..8f225fe6ed 100644
--- a/mkspecs/features/qt_module_config.prf
+++ b/mkspecs/features/qt_module_config.prf
@@ -1,4 +1,12 @@
-load(qt_module)
+!no_qt_module_warning:if(!contains(QMAKE_INTERNAL_INCLUDED_FILES, .*qmodule\\\\.pri)|isEmpty(QMAKE_QT_MODULE_PRI_LOADED)) {
+    QMAKE_ACTUAL_PRO_FILE = $$basename(_PRO_FILE_)
+    isEmpty(QMAKE_ACTUAL_PRO_FILE): QMAKE_ACTUAL_PRO_FILE=.pro
+    warning("You should probably load(qt_module) first in $$QMAKE_ACTUAL_PRO_FILE for $$TARGET, as it also load()s qt_module_config.")
+    message("Not doing so may lead to qt_module_config.prf overriding compiler/linker options in your .pro file.")
+    message("Ignore this warning with CONFIG+=no_qt_module_warning if you know what you are doing.")
+    unset(QMAKE_ACTUAL_PRO_FILE)
+}
+load(qt_module) # loads qmodule.pri if hasn't been loaded already
 
 isEmpty(MODULE):MODULE = $$section($$list($$basename(_PRO_FILE_)), ., 0, 0)
 isEmpty(TARGET):error("You must set TARGET before include()'ing $${_FILE_}")