Unsolved Project ERROR: Unknown module(s) in QT: datavisualization
-
I have installed Qt from https://download.qt.io/archive/qt/5.10/5.10.1/qt-opensource-linux-x64-5.10.1.run and included the datavisualization components.
I have attempted to open the examples project .../Qt5.10.1/Examples/Qt-5.10.1/datavisualization/datavisualization.pro and the above error occurs.
Is there some simple step that I have missed or do I need to apply some convoluted workaround to make it build?
-
I have tried following this:
https://doc.qt.io/archives/qt-5.7/qtdatavisualization-getting-started.html#installing-the-qt-data-visualization-module...however the source fails to compile
engine/bars3drenderer.cpp: In member function ‘void QtDataVisualization::Bars3DRenderer::drawSlicedScene()’:
engine/bars3drenderer.cpp:849:43: error: invalid conversion from ‘int’ to ‘Qt::AlignmentFlag’ [-fpermissive]
Qt::AlignLeft | Qt::AlignTop, true);
~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1198,
from /usr/include/x86_64-linux-gnu/qt5/QtCore/QtCore:4,
from ../../include/QtDataVisualization/QtDataVisualizationDepends:3:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:120:41: note: initializing argument 1 of ‘constexpr QFlags<T>::QFlags(Enum) [with Enum = Qt::AlignmentFlag]’
Q_DECL_CONSTEXPR inline QFlags(Enum flags) Q_DECL_NOTHROW : i(Int(flags)) {}
~^
make[2]: *** [Makefile:3019: .obj/bars3drenderer.o] Error 1Note also that I am using qt5.13, where there is no mention of needing to install the module:
https://doc.qt.io/qt-5/qtdatavisualization-index.html -
Hi and welcome to devnet,
Looks like you are mixing your distribution provided Qt and a custom installation.
How did you install Qt ?
How are you using it ? -
I installed using the zip archives linked above, also using it from both QT creator and qmake on the command line.
I think my next steps will be to uninstall and then try other releases, eg 5.12 and 5.7 I may also try some Docker images.
Are there any registration files I should inspect?
-
Then from the looks of it, you didn't use the full path to qmake. Which means you likely didn't use the one you think you were using.
-
@Jason_C - I experienced the same gcc/g++ errors. It turns out that I'd previously installed anaconda2 on my system, which comes with its own versions of qt and qmake, and interjects that qmake into your PATH on installation. After I fixed that, qmake/make for qtdatavis3d builds correctly.
-
Hey all. I decided to go for the nuclear option and strip everything QT-related from my system, which appears to have damaged a load of KDE-related stuff. I did:
dpkg --list | grep qt
apt-get remove qt5-*
apt-get remove qml-*
apt-get remove --purge qt*
apt-get autoremove
apt-get remove --purge libqt5*Then I ran the installer: (this might have failed to copy stuff to system directories)
export DISPLAY=:0
./qt-opensource-linux-x64-5.10.1.runI didn't submit my QT username; I used the "skip" option instead. I selected only gcc64 and datavisualization components.
I also had to edit .bashrc to add the qmake path:
export PATH=$PATH:<etc>:/home/<username>/Qt5.10.1/5.10.1/gcc_64/bin....and finally I was able to compile the examples.
I had to reinstall dolphin and kate in order to get them to work again. The examples still compiled OK afterwards.
......then, after rebooting the machine, it would only show a command prompt. I had to edit /etc/network/interfaces to restore the ethernet connection, then I had to install kde-plasma-desktop.
Then qmake would no longer run, with:
qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directorySo I had to fix that by adding a hard link (a symbolic link did not work):
/usr/lib/qt5/bin$ sudo ln /home/<username>/Qt5.10.1/5.10.1/gcc_64/bin/qmake qmakeAfter that qmake (and everything else) worked again.
-
That was a wrong move. You basically removed your distribution provided Qt. You can remove the development related package but you should not replace it with the pre-built package.
As I already suggested, use the full path to the qmake version you want to use so you ensure you don't mix stuff in your system. Qt Creator does that for you when you have several Qt version installed.