I really don't get how to install Qt5 in Ubuntu from the official repositories - Qt4 is broken now, need help...
So i am in this page
and it said that qt5 will support ubuntu phones and ubuntu tablets.. so i want to install qt5 at my ubuntu 12.10 computer.
Step 1: Unistalled qt 4 from Ubuntu software center
Step 2: Runned commands:
sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get install ubuntu-sdk notepad-qml
and the command located here: http://pastebin.ubuntu.com/1616713/
Opening Qt creator and going to the about dialog, it is Qt 4.8.3
trying to run my project
:-1: error: The Qt version is invalid: qmake does not exist or is not executable
:-1: error: The qmake command "/usr/bin/qmake-qt4" was not found or is not executable.
Did you try to add Qt 5 to the known Qt Version ?
And by that you mean?
In the options of QtCreator you can manage what Qt version are available.
Look for Build and Run -> Qt Versions, see if it lists all the Qt version you have installed. If not add it yourself.
Well i am in a bad position right now.. there is no official way to unistall qt 5.. so i just deleted the qt 5.0.1 folder from home folder..
i tried on getting back to qt4, now what i get is this:
it seems like Qt 4.8.3 in PATH (System) doesnt work:
That Kit says "Qt version:" "None". So you can not use it for Qt projects. Add the Qt version again and select it in the kit and you should be done.
it seems like i don't have any Qt Version..
Ah ah so confused..
How about adding it then?
The Qt Creator manual describes how to do that (and add a kit, too).
Ok so i clicked the add button searched for the qmake exexutable in the /usr/bin and everything is ok now..
Can u tell me now why i have problems with QT 5? I mean my problem is that if i install qt 5, and try to run my project, in the line
@#include "QDialog" @
it gives me an error of qdialog file not existing...
When you install Qt 5 from the ppa mentioned above (and in general) you just keep your Qt 4 around. The two happily coexist. What you want to do is to make sure you have a qmake from Qt 5 and add that to Creator.
First you will need to enable support for widgets in the .pro file to work with Qt 5. Check the "Qt5 porting guide":https://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html for a list of changes. I really recommend checking the documentation when upgrading any library, especially when upgrading to another major version.
Second you should use "" when including files in the current directory. Assuming that you do not put your headers and code next to the Qt headers that is not the case. It does work, since the include paths are checked after the current path, but it still provides the feeling that QDialog belongs to your code and not to Qt.