【发布时间】:2022-05-10 17:15:20
【问题描述】:
我知道这方面有很多问题:
- QML module not found (QtCharts)
- How to include the QtCharts library in Qt Creator 4.2.0 (Community)
- How to fix "QtCharts" library file not found/can't include <QtCharts>?
- Importing QtCharts in QML causes module not installed error
- 还有更多...
但是他们中的大多数通过在 Qt 维护工具中添加 QtChart 来解决这个问题,我已经这样做了(并重新检查了它)。
但是在使用的时候:
QT += charts
我仍然收到Unknown module(s) in Qt 错误。
我已经在forum.qt.io 中问过这个问题,(正如我所问的,这个问题没有得到令人满意的答案,所以请不要判断我是否在您回答此问题时在论坛上找到了答案问题),有人说我需要先安装和构建模块。
如果是这种情况,我该怎么做?如果没有,我该怎么办?我正在考虑重新安装 Qt 并在安装时立即添加模块。
问题链接:https://forum.qt.io/topic/127564/qtcharts-module-not-found-even-after-installing-in-qt-maintenance
一些系统信息:
- Windows 10、64 位
- QtCreator 4.15.1
- Qt 5.12.2(MSVC 2019,64 位)
【问题讨论】:
-
两次检查您使用的 Qt 版本是否与您在 Qt 维护工具中看到的相同。检查二进制文件夹以确保插件已安装(通常是 QT/VERSION/PLATFORM/qml/QtCharts/)。尝试使用基于 CMake 的项目而不是 .pro。尝试将调试消息 on 至少打开 QT_DEBUG_PLUGINS。
-
我检查了文件夹
C:\Qt\5.15.2\mingw81_64\qml(我不确定这是否正确),但没有看到 QtCharts 文件夹。如果是这个原因,那我该如何安装呢? -
你可能安装了另一个版本
标签: c++ qt module qml qtcharts