Serial Port usage
-
Thank you for your attention,Alek
I tried That one for Qt5, but no different:
!http://www.8pic.ir/images/28121612802292626722.png(Serial Port)! -
This just shows Qt version that Qt Creator was built with! To check which version are you using, see Kits in Options->Build & Run, or your project settings.
-
!http://www.8pic.ir/images/19267283463456159770.png(Serial Port)!
-
Well, you're using Qt 4.8.1 and not Qt5 indeed, so you definitely should include the QtSerialPort module the Qt4 way (leaving the Qt5 line in a conditional or just removing it).
-
Are you sure you've installed QtSerialPort correctly, then? Have you set QTDIR before running make install? It seems you have Qt4 that comes with Ubuntu. I have not tried using serial port with that version of Qt, I can't confirm it works (I'm building Qt myself).
-
Yes,after installation,"QtSerialPort" folder created in includes folder:
!http://www.8pic.ir/images/97864825867755441174.png(Serial Port)! -
I guess it looks for includes in /usr/include/qt4/4.8.1/include. Try adding this to your .pro file as a workaround, or reinstall QtSerialPort:
@
INCLUDEPATH += /usr/include/qt4
@ -
QtSerialPort defined to Qt, cause the compiler doesn't get error for the headers(first image).
May be I have to try it with other versions of QtSerialPort.
If you find a way to solve my problem, tell me please.
In either case, Thank you all. -
Try including:
@
#include <QSerialPort>
#include <QSerialPortInfo
@
instead. Maybe it sees the module headers but not the concrete ones. That's a shot in the dark, though. -
Thank you very much sierdzio,
No different:
!http://www.8pic.ir/images/72918578813541034521.png(Serial Port)! -
Mohammadsm,
-
Try to remove all QtSerialPort parts from system - to remove all directories from /usr/include/qt4/QtSerialPort and all *.so (by searching), etc. from system directories of your Ubuntu (I don't know where to place in Ubuntu packages with Qt4/Qt5 are installed, I don't use Ubuntu).
-
Try rebuild and reinstall QtSerialPort from QtCreator. It will allow to generate Makefile with the necessary QTDIR, etc. automatically, just do:
- open qtserialport.pro with your Qt4.8.1 kit
- add to QtCreator tab with "project build configuration page" the new Make target like "sudo install"
- rebuild library
In this case the library will be compiled and be installed automatically from QtCreator.
PS: here I am not sure that "sudo" will correctly be executed from QtCreator, I didn't check.
- If "sudo" isn't executed, you run the terminal, cd to a build directory with library (like "qtserialport-build-4_8_1_Desktop-Release") and execute manually "sudo install" from terminal. It has to help.
-
-
Yessss,I made it,finally.I found where was the bug!
!http://www.8pic.ir/images/09264115279337141243.png(Serial Port)!
The "QT_MAJOR_VERSION" was "5".
This source provided for Qt5, I just changed the version number.
!http://www.8pic.ir/images/99918515869336409977.png(Serial Port)!Thank you all,very much
-
Is this a special ubuntu phone SDK creator or are those ubuntu plugins part of every Qt Creator installation on ubuntu?
-
If I understand you, it's the external Ubuntu Phone SDK not included in Qt and I installed it form "Go moile":http://developer.ubuntu.com/get-started/gomobile/.
!http://www.8pic.ir/images/15454816010375575771.png(Ubuntu Phone SDK)! -
/me sighs.
Did they really break keyboard shortcuts for that stupid page? We made the welcome mode extendable so that people can put their pages there together with the others...