简体   繁体   English

Qmake 错误:QT 中的未知模块:图表

[英]Qmake error : Unknown module(s) in QT: charts

Am getting the error when I Run qmake on my application在我的应用程序上运行 qmake时出现错误

Unknown module(s) in QT: charts 

I am using Qt Creator 4.8 (Enterprise) and Qt library 5.12 on Windows 7.我在 Windows 7 上使用 Qt Creator 4.8(企业版)和 Qt 库 5.12。

My .pro file has the following line:我的.pro文件有以下几行:

QT += core gui charts

In my source file I include ChartView like this:在我的源文件中,我像这样包含ChartView

#include <QtCharts/QChartView>
...

However, when I run one of the demo examples that ships with QT and have a similar include, the program compiles and runs fine.但是,当我运行 QT 附带的演示示例之一并具有类似的包含时,程序编译并运行良好。 The example am running is found here:正在运行的示例可在此处找到:

..Qt5.12.0\Examples\Qt-5.12.0\charts\donutchart

What am I missing in my application?我的应用程序中缺少什么?

Regards,问候,

Paul保罗

To resolve this I had to re-install the Qt library.为了解决这个问题,我不得不重新安装 Qt 库。 Actually I decided to upgrade to Qt 5.13.2, now the program compiles and runs well.其实我决定升级到Qt 5.13.2,现在程序编译运行良好。

Things to note:注意事项:

The MaintenanceTool does not work very well, I think it is still work-in-progress.维护工具运行得不是很好,我认为它仍在进行中。 I managed to remove QtCharts module for Qt 5.12 using the tool, however, when I tried to use it to re-install the module, the Maintenance tool could not find the QtCharts library.我设法使用该工具删除了 Qt 5.12 的 QtCharts 模块,但是,当我尝试使用它重新安装模块时,维护工具找不到 QtCharts 库。 I was eventually forced to remove the entire 5.12.0 library and install 5.13.2.我最终被迫删除整个 5.12.0 库并安装 5.13.2。 The program now compiles well.该程序现在编译良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM