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.
-
@KillerSmath I installed those packages via Software Center. Perhaps have I to uninstall them and re-install via apt-get?
Could it be the reason for the "unknown module" error?wrote on 13 Jun 2018, 08:15 last edited by KillerSmath@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
-
-
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.
-
wrote on 13 Jun 2018, 08:28 last edited byThis post is deleted!
-
@douglas
In QtCreator go to Tools -> Options -> build & run and check your kitsIn sidebar under the "Projects tab" you can select one of your installed kits:
-
@douglas
In QtCreator go to Tools -> Options -> build & run and check your kitsIn sidebar under the "Projects tab" you can select one of your installed kits:
-
@douglas
from what one can see, it at least seems to be a version of Qt5, for more information press the "Manage kits" button -
@douglas
from what one can see, it at least seems to be a version of Qt5, for more information press the "Manage kits" buttonwrote on 13 Jun 2018, 09:34 last edited by@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. -
@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.
-
@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.
wrote on 13 Jun 2018, 10:07 last edited by@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. -
@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.@douglas Above you said you installed Qt 5.6, now you selected Qt 5.7.1
Which Qt version do you really want to use and did you install QtSearialPort for Qt 5.7.1? -
@douglas Above you said you installed Qt 5.6, now you selected Qt 5.7.1
Which Qt version do you really want to use and did you install QtSearialPort for Qt 5.7.1?wrote on 13 Jun 2018, 11:54 last edited by@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?
-
@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?
wrote on 13 Jun 2018, 12:25 last edited by@douglas could it be possible that you start from scratch with a clean installation of Qt, ideally latest version 5.11? you may try in a virtual machine just in case.
-
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.
-
Sur it does, you are trying to install the desktop version of the driver and then, use it to do cross-compilation.
wrote on 14 Jun 2018, 06:28 last edited by@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. -
@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.@douglas You need Qt (together with Qt Searial Port) cross compiled for your device
-
wrote on 14 Jun 2018, 07:49 last edited by
@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!
19/58