Project ERROR: Unknown module(s) in QT: charts
Asked Answered
R

4

13

I am building a QT app using QTwidgets to run in a RaspberyPi3 with an image inside the SDcard built with buildroot. I suppose that charts are supported since they are based in QtWidgets and widgets are supported.

My problem is, when i integrate Charts in my project and run the project in the computer, there is no problem, however when I try to deploy this to the Raspberry the files and libraries are not included and errors show up.

In my .pro file I have: QT += charts

But this gives the following error:

error: Unknown module(s) in QT: charts

However, if I remove this, some errors come saying that the libraries are not found:

QtCharts/QChartGlobal: No such file or directory

I think that my problem is just not giving to the project the directories of the libraries or plugins in the raspberry sd card. Can anyone help me? If more information is needed just ask I will try to answer as fast as possible.

Raynard answered 9/2, 2018 at 17:14 Comment(10)
what is your OS?Beatify
Hi, I am using ubuntu!Sanjuanitasank
sudo apt install libqt5charts5 libqt5charts5-devBeatify
Thats strange because I get this error: E: Unable to locate package libqt5charts5 And I try to fix it as they say in the link below, but it still wont locate package. askubuntu.com/questions/378558/…Sanjuanitasank
execute sudo apt-get update && apt-cache search qt5 and tell me what you get.Beatify
Well it displays a lot in text with a huge amount of libraries that would be too much to post here, but I have searched in all those libraries are no reference to "charts" was found, really.Sanjuanitasank
Download: github.com/qt/qtcharts/archive/5.10.zip, decompress, then with the console enter that folder and then execute qmake, then make and at the end sudo make install.Beatify
What version of Qt do you have?Beatify
Qt in Buildroot is 5.8 In Desktop, if I do "Help" -> "About Qt Creator" it says "Qt Creator 4.0.2" and below "Based on Qt 5.7.0"Sanjuanitasank
If i try to do qmake I got this message: "qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory"Sanjuanitasank
U
6

You will need to enable the qt5charts package, which has recently been added to Buildroot. It is included in our 2018.02-rc1 release candidate from earlier this week:

http://git.buildroot.net/buildroot/tree/package/qt5/qt5charts

Upthrust answered 10/2, 2018 at 19:34 Comment(1)
Thank you for the asnwer. I did make clean in my buildroot folder, and then I deleted it. I followed all the steps for installing and configuring that recent version of the buildroot BUT It wont boot on the board. I get the error: Kernel panic - not syncing: Attempted to kill init! I have read a lot of discussions online but nothing seems to solve this problem. Has this new version been tested for bugs ?Sanjuanitasank
A
3

On Ubuntu 18.04, installing libqt5charts5-dev (as suggested by eyllanesc) using Synaptic Package Manager solved my issue. Version: Qt Creator 4.5.2 based on Qt 5.9.5.

Agni answered 17/12, 2020 at 14:23 Comment(0)
R
0

So, I solved this problem with the answer from Peter Korsgaard. Bassicly I removed my old bluetooth version, installed the new version which supports QtCharts ( https://buildroot.org/downloads/buildroot-2018.02-rc1.tar.gz ), and now my application is running. Problems found: Had the change the content of my cmdline.txt and config.txt because they were making the new version crash in boot and give "Kernel Panic". I just used the default cmdline.txt and config.txt generated by make, and now its running.

Raynard answered 11/2, 2018 at 20:18 Comment(0)
B
0

This is a more general answer valid for Qt5 modules on Debian-based distributions (including Ubuntu and presumably Raspbian). Run the following command from a normal command-line (no need for administration rights):

~ apt-file search /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib | grep chart

This will give you lines with the name of the relevant package(s). You can replace chart by the name of any other missing Qt module.

I suspect it is easy to modify this for Qt6, I haven't tried yet.

Bareheaded answered 18/4, 2023 at 16:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.