I have installed Qt 5.7 in order to try Qt Charts and Qt Data Visualization but I cannot find new widgets neither in Qt Designer nor in Qt Creator. Any suggestions what should I do so new widgets appear in designer?
-
1AFAIK those for commercial Qt license only. Unsure why it is not explicit. – Alexander V Jun 16 '16 at 23:33
-
1Not anymore - since version 5.7 that's why I am interested in those libraries now – user306080 Jun 17 '16 at 00:13
-
1Did you include appropriate header? Take a look at docs and examples - `https://doc-snapshots.qt.io/qtcharts/` – folibis Jun 17 '16 at 11:13
-
Of course I did. Answer is below – user306080 Jun 19 '16 at 23:16
4 Answers
I was having exactly the same problem today. It looks like the QT Designer plugins of QT Charts are not part of the package by default. I ended up downloading the designer plugin sources from github https://github.com/qtproject/qtcharts/tree/5.7/plugins/designer This consists of just 5 files.
You should then be able to open the designer.pro project in Qt Creator and compile it. Place the resulting library in your designer plugin directory. This will make the QChartsView widget appear in the Qt Designer.

- 361
- 1
- 6
-
Note that you may have to copy QtCharts.dll into the bin folder of QtCreator or the compiled plugin will fail to load. – zeFrenchy Aug 23 '17 at 14:51
Just elaborating on Holger's answer for ubuntu, compile, in terminal using qmake and make (doesn't work in qt creator - you need qt chart development package installed, which I believe is not available at this point in time), the designer.pro file in /opt/Qt/5.7/Src/qtcharts/plugins/designer directory then, copy and paste the shared library into /opt/Qt/Tools/QtCreator/lib/Qt/plugins/designer directory, where /opt/Qt is the directory in which Qt is installed.

- 131
- 10
-
genius, after hours of searching through the internet, I finally found your answer. Holger's answer doesn't include the path to copy shared library to – Lala Jan 09 '21 at 17:11
I would like to add this as a comment to the accepted post:
If you are using python to build your project and process the .ui
files with pyuic5
it might be the case that pyuic5
leaves you with an error message stating that QtChart.QChartview
could not be found. This is the workaround:
Go to the site-packages/PyQt5/uic/widget-plugins directory, it should look something like this:
/widget-plugins/
__pycache__/
qaxcontainer.py
qscintilla.py
qtcharts.py <- create this file by copying qtquickwidgets.py and renaming
qtprintsupport.py
qtquickwidgets.py
qtwebkit.py
qtcharts.py
looks like this (you have to edit the file):
# copyright information
pluginType = MODULE
def moduleInformation():
return "PyQt5.QtChart", ("QChartView", )

- 407
- 6
- 16
I also encountered this problem today, but Holger's way didn't work on my situation. After consulting other people via internet, I finally fixed it. And my solution is quiet simple, I just open the Maintenance Tool and choose add components, select Qt Charts and Qt Data Visualization, and click next, and then it works. This problem happens because by default Qt Charts is not selected while installing Qt, so we should add this component manually.
But I also should mention that maybe this way just work on Qt which was installed by Qt Online Installer, and if you installed Qt via offline Installer, maybe you should reinstall it.

- 27
- 3