QtSerialPort QSerialPort no such file or directory

Mahdi_Nine picture Mahdi_Nine · Jun 20, 2013 · Viewed 15.3k times · Source

I use this tutorial : http://doc-snapshot.qt-project.org/qt5-stable/qtserialport/blockingmaster.html

But when I want to run it Qt Creator generates the following error:

error: Unknown module(s) in QT: serialport

When I hold mouse on #include <QtSerialPort/QSerialPort> it says:

include no such file or directory

I use Qt 5.0.1 any idea?

Answer

Stefano Zuinisi picture Stefano Zuinisi · May 8, 2018

Try including #include <QtSerialPort/QSerialPort> instead of
#include <QSerialPort>, that worked for me