Problems when adding serialport module in Qt project
-
That's just the information about Qt Creator.
You have to check the Kit you are using to build your application and which version of Qt it is using.
-
@douglas
If nothing works, you can try to manage the packages from MaintenanceTool of QtCreator-
- <Qt Folder>/MaintenanceTool
-
- Add or remove Components
-
- Expand your Qt version
-
- Expand Source Components
-
- Select the Qt Source Package
-
- Next, Install
-
-
This post is deleted!
-
@J.Hilk The Manage Kit button shows the settings reported below, in which I can't find any information regarding the Qt version in use:
If from terminal I write
$ qmake --version
I obtain the following:
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
Is it relevant the "qt4" shown in that prompt?
Thanks. -
@douglas
well, there we have your problemyou have no QtLibary selected to your kit. Se if you can actually select a QtVersion from that dropdown menu. If you can't than you need to install an actual qt version.
I would recommend the online installer from the Webside.
-
@J.Hilk Thanks, I added the version as shown below:
Now, since I should have Qt5, I added the serialport support in my .pro file, but the "unknow module" error still remains. I saw another thing that seems not so clear to me: I run Qt Creator from linux terminal, and when I open my project the terminal shows the following lines, marked in red, in which appears Qt4. Can this be related to the serialport module error?
thank you again. -
@jsulm when I spoke about Qt 5.6 I was referring to the "About Qt Creator" window shown above. Now I selected Qt 5.7.1 as the version for my kit. But the serialport module isn't recognized yet. What I should do to correctly install QtSerialPort for my actual version?
-
Is it me or are you trying to build your project for an embedded system ?
I see that you are trying to use an arm compiler, did you cross-compile Qt for your device ? -
Sur it does, you are trying to install the desktop version of the driver and then, use it to do cross-compilation.
-
@SGaist I see. So, if I need to cross-compile, which steps should I follow in order to use the serialport in my project?
Are there different libraries or drivers I need to install on my host PC?
The target linux embedded device runs Linux Yocto. -
@jsulm I already set up the project in order to cross-compile for my target: in fact, I have already managed to run my application on the target device. The problem is the serial port module: I did not succeeded in including it into my project. Are there any particular hints to follow in the case of cross-compilation?
Thank you!