You need to suppress each directory separately. Example from my project:
QMAKE_CXXFLAGS += -isystem "$$[QT_INSTALL_HEADERS]/qt5" -isystem "$$[QT_INSTALL_HEADERS]/qt5/QtWidgets"
-isystem "$$[QT_INSTALL_HEADERS]/QtXml" -isystem "/usr/include/qt5/QtGui"
-isystem "$$[QT_INSTALL_HEADERS]/QtCore"
Or, to automate the above for the exact Qt modules you have enabled:
for (inc, QT) {
QMAKE_CXXFLAGS += -isystem "$$[QT_INSTALL_HEADERS]/Qt$$system("echo $$inc | sed 's/.*/u&/'")"
}
# Still need this separately:
QMAKE_CXXFLAGS += -isystem "$$[QT_INSTALL_HEADERS]/qt5"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…