Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I really don't get how to install Qt5 in Ubuntu from the official repositories - Qt4 is broken now, need help...
QtWS25 Last Chance

I really don't get how to install Qt5 in Ubuntu from the official repositories - Qt4 is broken now, need help...

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 14.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leon
    wrote on last edited by
    #1

    So i am in this page
    http://developer.ubuntu.com/get-started/gomobile/

    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.

    SO confused...

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Did you try to add Qt 5 to the known Qt Version ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Leon
        wrote on last edited by
        #3

        And by that you mean?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Offline
            L Offline
            Leon
            wrote on last edited by
            #5

            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:
            !http://i.imgur.com/NC5UkS2.png(1)!

            it seems like Qt 4.8.3 in PATH (System) doesnt work:
            !http://i.imgur.com/z8gRSpS.png(1)!

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                Leon
                wrote on last edited by
                #7

                it seems like i don't have any Qt Version..

                !http://i.imgur.com/g5E9vJk.png(1)!

                Ah ah so confused..

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #8

                  How about adding it then?

                  The Qt Creator manual describes how to do that (and add a kit, too).

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    Leon
                    wrote on last edited by
                    #9

                    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...

                    1 Reply Last reply
                    0
                    • frederikF Offline
                      frederikF Offline
                      frederik
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tobias.hunger
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved