【问题标题】:How to include the QtCharts library in Qt Creator 4.2.0 (Community)如何在 Qt Creator 4.2.0(社区)中包含 QtCharts 库
【发布时间】:2017-05-28 06:31:36
【问题描述】:

我试图包含 QtCharts,但是当我包含库时出现错误,这是错误:

项目错误:QT 中的未知模块:图表。

我在 *.pro 文件中包含了 QT += 图表,如下所示:

QT += charts
greaterThan(QT_MAJOR_VERSION, 4): QT += charts

SOURCES += \
    source.cpp

但它不起作用。请帮帮我。

【问题讨论】:

  • 请显示完整的.pro
  • 使用 QT += 核心 gui 图表
  • QT += core gui charts greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  • 它不起作用(这是我的 *.pro 文件):QT += core gui charts greaterThan(QT_MAJOR_VERSION, 4): QT += widgets SOURCES += \ source.cpp
  • 你有什么版本的Qt?

标签: c++ qt qt5 qtcharts


【解决方案1】:

在安装过程中您必须启用Qt Charts。默认情况下不启用。:

点击Qt图表:

【讨论】:

  • 我已经使用了Qt Maintenance,但错误仍然存​​在,您能帮忙吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-05-07
  • 1970-01-01
  • 2011-02-14
  • 1970-01-01
  • 1970-01-01
  • 2014-01-02
  • 1970-01-01
相关资源
最近更新 更多