Qt Widgets and Data Visualization

I installed Qt 5.7 to try Qt Charts and Qt Data Visualization, but I can not find new widgets in either Qt Designer or Qt Creator. Any suggestions, what should I do for new designers to appear in the designer?

+6
source share
4 answers

Today I had the same problem. It seems that QT Designer plugins in QT Charts are not part of the default package. I finished downloading the sources of the designer plugin from github https://github.com/qtproject/qtcharts/tree/5.7/plugins/designer It consists of only 5 files.

Then you have to open the designer.pro project in Qt Creator and compile it. Put the resulting library in the plugin directory of your designer. This will cause the QChartsView widget to appear in Qt Designer.

+6
source

Just specifying Holger’s answer on ubuntu, compile in the terminal using qmake and make (does not work in qt creator), you need to install the qt diagram development package, which, it seems to me, is not available at the moment), the designer.pro file in the directory / opt / Qt / 5.7 / Src / qtcharts / plugins / designer, then copy and paste the shared library into the / opt / Qt / Tools / QtCreator / lib / Qt / plugins / designer directory, where / opt / Qt is the directory in which Qt is installed.

+2
source

Today I ran into this problem, but Holger did not work on my situation. After consulting with other people over the internet, I finally fixed it. And my solution is quite simple, I just open the Maintenance Tool and select add components, select Qt Charts and Qt Data Visualization, and then click on next and then it will work. This problem occurs because, by default, Qt Charts is not selected when Qt is installed, so we must add this component manually.

But I should also mention that perhaps this method just works on Qt, which was installed by the Qt Online Installer, and if you installed Qt through a standalone installer, you might need to reinstall it.

+1
source

I would like to add this as a comment on the accepted post:

If you use python to create your project and process .ui files using pyuic5 , it may happen that pyuic5 leaves an error message stating that QtChart.QChartview not found. This is a 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", ) 
+1
source

All Articles