Qt Serial Port Support with Qt 6
-
Hi,
I am using Qt 6.04 now. And I need to use Qt serial port for reading serial data .
But it is throwing error when I added QT += serialport in my application .pro file.
:-1: error: Project ERROR: Unknown module(s) in QT: serialport*Now I have noticed in the https://doc-snapshots.qt.io/qt6-dev/whatsnew60.html#removed-modules-in-qt-6-0 that serial port support is removed for qt 6.
Now what can be done to read serial data from qt application ? Is there any other alternative method to handle this ?
Please provide the support.
-
This sub-forum has a sticky post: "Read before posting in this category!" where you can find links when which module is supported in Qt6. Take a look at the changes for Qt 6.2 and you will find your QtSerialPort module.
-
@Christian-Ehrlicher Thanks for your reply. Now I installed Qt 6.2 and got support for Qt Serial Port Library.
-
@Christian-Ehrlicher thanks! I was using Qt6 and also had Qt5 installed to support QSerialPort. The cmake was able to handling including the Qt5 libraries. :) Anyway, i'll be reworking my cmake to just use Qt 6.2