2016-09-28 61 views
0

我基於Qt 5.7.0(GCC 4.9.1 20140922(紅帽4.9.1-10),64位)找不到examples.pri文件

使用Qt Creator的4.0.3 並試圖運行此示例:http://doc.qt.io/qt-5/qtdatavisualization-surface-example.html

但出現錯誤::-1:錯誤:無法找到examples.pri文件! ,我無法找到這個問題的網絡解決方案..

這就像我沒有這樣的例子?如何將它們無痛地包含到我的系統中? 也許有一個簡單的方法來解決它。

+0

這是確定以刪除相關的行到'examples.pri'。 –

+0

我試過了,但是在代碼中會出現更多的錯誤.. – John

回答

1

您可以將文件從Qt的本地安裝路徑複製,即從:

/opt/Qt5.7.0/Examples/Qt-5.7/datavisualization/examples.pri 

通常該文件中包含的項目配置相關的信息:

requires(qtHaveModule(multimedia)) 

!include(../examples.pri) { 
    error("Couldn't find the examples.pri file!") 
} 

QT += 3dcore 3dquick qml quick multimedia 

SOURCES += \ 
    main.cpp \ 
    touchsettings.cpp 

HEADERS += \ 
    touchsettings.h 

OTHER_FILES += \ 
    *.qml 

RESOURCES += \ 
    audio-visualizer-qml.qrc 
+0

非常感謝! – John