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.

10
  • what is your OS? Commented Feb 10, 2018 at 2:17
  • Hi, I am using ubuntu! Commented Feb 10, 2018 at 5:30
  • 4
    sudo apt install libqt5charts5 libqt5charts5-dev Commented Feb 10, 2018 at 5:37
  • 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/… Commented Feb 10, 2018 at 16:02
  • execute sudo apt-get update && apt-cache search qt5 and tell me what you get. Commented Feb 10, 2018 at 16:04

4 Answers 4

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

Sign up to request clarification or add additional context in comments.

1 Comment

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 ?
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.

Comments

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.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.