• 方法一

    1
    2
    3
    TEMPNAME = $${QMAKE_QMAKE}
    QTPATH = $$dirname(TEMPNAME)
    message($$QTPATH)
  • 方法二

    1
    2
    QTPATH = $$[QT_INSTALL_LIBS]/../bin
    message($$QTPATH)