I use Qt Creator 10.0.1 with Qt 6.5.1 version. I installed QtSerialPort version 6.5.2 from the maintenance tool.
I've added QT += serialport to my .pro file but I get the "Unknown module" error from that.
Do I have to download QtSerialPort version 6.5.1 or are there some steps that I'm missing? I expected that the QT += serialport would work if I had any of the 6.5 versions.
EDIT: The project works now when I changed the whole project to Qt 6.5.3.
QT += core gui
QT += serialport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the
APIs deprecated before Qt 6.0.0
QMAKE_CXXFLAGS += -Wa,-mbig-obj # This line is for QCustomPlot to work
SOURCES += \
main.cpp \
mainwindow.cpp \
qcustomplot.cpp
HEADERS += \
mainwindow.h \
qcustomplot.h
FORMS += \
mainwindow.ui
RESOURCES += \
resources.qrc
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
If you are building against version 6.5.1, you need the modules from this version. I would switch the whole project to the latest version, i.e. 6.5.3.