【问题标题】:Couldn't find the examples.pri file找不到 examples.pri 文件
【发布时间】:2016-09-28 12:39:54
【问题描述】:

我正在使用 Qt Creator 4.0.3 基于Qt 5.7.0(GCC 4.9.1 20140922(Red Hat 4.9.1-10),64位)

我尝试运行这个示例:http://doc.qt.io/qt-5/qtdatavisualization-surface-example.html

但出现错误::-1: error: 找不到examples.pri 文件! 我在这个问题的网络解决方案中找不到..

好像我没有这样的例子?如何将它们轻松包含到我的系统中? 也许有一种简单的方法可以解决它。

【问题讨论】:

  • 把examples.pri相关的行去掉就可以了。
  • 我试过了,但是代码中会出现更多错误..

标签: qt


【解决方案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

【讨论】:

  • 这个文件在哪里?我在/opt下找不到它
猜你喜欢
  • 1970-01-01
  • 2021-12-26
  • 1970-01-01
  • 1970-01-01
  • 2014-04-09
  • 1970-01-01
相关资源
最近更新 更多