當(dāng)使用QT5 Creator加載一個(gè)項(xiàng)目并且添加新的現(xiàn)有文件后,無(wú)法啟動(dòng)調(diào)試自啟動(dòng)/調(diào)試按鈕,程序的程序或者是灰色的,如果移動(dòng)鼠標(biāo)上的按鈕,工具提示會(huì)顯示它說(shuō):“.PRo文件無(wú)法解析”。
方法一: 把SOURCES HEADERS 參數(shù)中的 “/” 都去掉變成下邊這樣
SOURCES += main.cpp mainwindow.cpp hintdialog.cppHEADERS += mainwindow.h hintdialog.h方法二: 注意SOURCES HEADERS 參數(shù)中新加文件前空格數(shù)是否為4 的倍數(shù)。不是的話(huà),不好意思,一定顯示“The .pro file could not be parsed”
正常情況(+號(hào)表示空格 )
SOURCES += main.cpp/++++++++mainwindow.cpp/++++hintdialog.cppHEADERS += mainwindow.h/++++hintdialog.h錯(cuò)誤情況
SOURCES += main.cpp/++++++++mainwindow.cpp/++++hintdialog.cpp這里hintdialog.h前有5個(gè)空格是不對(duì)的。HEADERS += mainwindow.h/+++++hintdialog.h新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注