0

I have the same problem in Project ERROR: Unknown module(s) in QT: charts ; but my problem on Mac OS. I can not reply on that topic, so i open the new one.

I build on Qt Creator 4.6.0 and based on Qt 5.10.1 (Clang 7.0 (Apple), 64 bit). Can you help me get the solution for how to use the Qtchart in my project?

QT += quick
QT += chart

Explain the old problem

Thank you.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
trongan93
  • 19
  • 1
  • 4
  • 2
    Possible duplicate of [How to install a missing Qt module?](https://stackoverflow.com/questions/40200094/how-to-install-a-missing-qt-module) – Mike Apr 22 '18 at 17:21
  • @Mike I also turn on qtchart. But, this is not the problem. I have added new image extend that. – trongan93 Apr 22 '18 at 17:38

1 Answers1

0

Maybe because it is simply "charts" with an "s"?

QT += charts
Adrien Leravat
  • 2,731
  • 18
  • 32
  • I changed to charts. But this problem also continues. "found not working imports:...... Qtchart is not installed." – trongan93 Apr 22 '18 at 17:31
  • 1
    Could you include the log containing the error? Are you sure you use the right Kit for Qt5.10? Can you try with a working example like [this one](https://doc.qt.io/qt-5.10/qtcharts-linechart-example.html) ? – Adrien Leravat Apr 22 '18 at 17:50
  • It can run with the example. But cannot run in the project. The log is: `found not working imports file:...../main.qml:5 module "Qtchart" is not installed`. Coding on Line 5 is `import QtCharts 2.2` – trongan93 Apr 23 '18 at 04:06
  • Ok, then you can have a look at that QML example [here](https://doc.qt.io/qt-5.10/qtcharts-qmlaxes-example.html), and try to decrement QtCharts version to 2.1/2.0 just for test purposes. – Adrien Leravat Apr 26 '18 at 09:54