Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QtSerialPort QSerialPort no such file or directory

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?

like image 587
Mahdi_Nine Avatar asked Dec 20 '22 04:12

Mahdi_Nine


2 Answers

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

like image 56
Stefano Zuinisi Avatar answered Dec 24 '22 00:12

Stefano Zuinisi


QtSerialPort module is not part of Qt 5.0. It was added to the upcoming release Qt 5.1.

You are looking at the documentation snapshot for the upcoming release Qt 5.1. See http://doc-snapshot.qt-project.org/qt5-stable/qtdoc/index.html.

The documentation for Qt 5.0 is here: http://qt-project.org/doc/qt-5.0/qtdoc/index.html.

If you still want to try QtSerialPort, the RC1 of Qt 5.1 was just released. You can download it here: http://download.qt-project.org/development_releases/qt/5.1/5.1.0-rc1/

like image 21
cloose Avatar answered Dec 24 '22 01:12

cloose