Serial Port usage
I'm almost new to Qt. I want to make simple Terminal. I installed Qtserialport on Qt("qt-project.org/wiki/QtSerialPort":http://qt-project.org/wiki/QtSerialPort). But I got many errors during build the example:
Help me please...
Did you remember to modify your .pro file accordingly when dealing with QtSerialPort module, as stated "here":http://qt-project.org/wiki/QtSerialPort#c64518704ce0c0d5501a45763f464276?
Qt4: @CONFIG += serialport@
Qt5: @QT += serialport@
You seem to have added the line for Qt4. The one for Qt5 is different - are you really using Qt4 library (not sure, since the project is from 26th of May and you use greaterThan conditional)?
In either case, the line for Qt5 can go into such a conditional as well.
Thank you for your attention,Alek
I tried That one for Qt5, but no different:
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.
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:
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.
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,
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!
The "QT_MAJOR_VERSION" was "5".
This source provided for Qt5, I just changed the version number.
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)!
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...