Qt 5.1.1 Ubuntu 32bit Install - QSerialPort No Such File Or Directory
I have just removed my previous install of Qt 4.x and updated to 5.1.1 to get the Serial port functionality, however, when I try to #include <QSerialPort> the compiler can't find the header files.
I have added the QT += serialport to the project file, and can see the QSerialPort folder within the install directory: /home/matt/Qt5.1.1/5.1.1/gcc/include
Could it be that the installer has not added the new include paths? If so where are these set so I can manually check them. I have tied uninstall/reinstall but no luck. The same install on my Win7 machine worked fine.
Quick update, I have got around this issue by adding the install directory include path to the project file:
INCLUDEPATH += /home/matt/Qt5.1.1/5.1.1/gcc/include
Surely I shouldn't need to do this?
Finally got to the bottom of this. It was because the project had previously been created in Qt 4.x I had to re-create the project in Qt5 to get everything to work!
The QtSerialPort module is an addon, so the Qt5.1 package (I mean a base package) are not contains this addon.
You should install this addon with use "apt-get" from your Ubuntu's repo (if QtSerialPort for Qt5.1 is available for Ubuntu). Or you can take the official Qt5.1 installer for Linux, select appropriate boxes and install Qt5.1 with an QtSerialPort.