Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. "Module "QtQuick" version 2.3 is not installed"
Qt 6.11 is out! See what's new in the release blog

"Module "QtQuick" version 2.3 is not installed"

Scheduled Pinned Locked Moved Solved QML and Qt Quick
8 Posts 2 Posters 7.7k Views 3 Watching
  • 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.
  • eric-rktE Offline
    eric-rktE Offline
    eric-rkt
    wrote on last edited by
    #1

    I have searched thru Google and searched these forums, with no success.

    Just getting started on Qt and QtQuick. Installed qt-creator version 3.5.1 based on Qt 5.5.1. This is the one that my distro (CentOS 7) installs by default and is the only one listed as available in yum.

    I started the sample "Hello World" application that is loaded as a default when a QtQuick application is started.

    My main.qml is:

    import QtQuick 2.3
    import QtQuick.Window 2.2

    Window {
    visible: true
    MouseArea {
    anchors.fill: parent
    onClicked: {
    Qt.quit();
    }
    }

    Text {
    text: qsTr("Hello World")
    anchors.centerIn: parent
    }
    }

    I can't seem to get it to run with the "Run" icon in Qt Creator, so I just ran it from the command line with

    qmlviewer main.qml

    I get:

    Qml debugging is enabled. Only use this in a safe environment!
    file:///home/eric/Qt/HelloWorld/main.qml:1:1: module "QtQuick" version 2.3 is not installed

    When I installed Qt Creator, clearly something didn't install, but I've gone thru the install steps and don't see anything I might have missed.

    Any idea what's going on?

    How do I find the version of QtQuick (if any) that actually is installed? I've read that you can "import" a version that's earlier than the one installed and it will fall back to that earlier version. So, I tried 2.0, 2.1, 2.2 but no joy.

    Thanks...

    Eric

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

      Hi,

      Maybe a silly question but: did you install the Qt development packages from your distribution ?

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

      eric-rktE 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Maybe a silly question but: did you install the Qt development packages from your distribution ?

        eric-rktE Offline
        eric-rktE Offline
        eric-rkt
        wrote on last edited by
        #3

        @SGaist >> did you install the Qt development packages from your distribution ?

        Good evening, SGaist.

        Not a silly question at all. I basically became root and said "yum install qt-creator" and it installed whatever it was set up to install. Yum has been pretty good (although not perfect) in the past about installing everything that's needed and resolving dependencies. I got Qt Creator and Qt Designer and enough other stuff so that almost all that's available in Qt Creator works, except (apparently) Qt Quick.

        Was there something else I should have done to install the Qt development packages?

        If there was, I haven't been able to find a reference to it in the documentation or in Google.

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

          Check that you have also the QtDeclarative module installed. You should be able to check what is available with yum whatprovides "*/qt5"

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

          eric-rktE 1 Reply Last reply
          0
          • SGaistS SGaist

            Check that you have also the QtDeclarative module installed. You should be able to check what is available with yum whatprovides "*/qt5"

            eric-rktE Offline
            eric-rktE Offline
            eric-rkt
            wrote on last edited by
            #5

            I said "yum info qt5-qtdeclarative" and got:

            Installed Packages
            Name : qt5-qtdeclarative
            Arch : x86_64
            Version : 5.5.1
            Release : 2.el6
            Size : 9.6 M
            Repo : installed
            From repo : epel
            Summary : Qt5 - QtDeclarative component
            URL : http://www.qt.io
            License : LGPLv2 with exceptions or GPLv3 with exceptions
            Description : Qt5 - QtDeclarative component.

            Available Packages
            Name : qt5-qtdeclarative
            Arch : i686
            Version : 5.5.1
            Release : 2.el6
            Size : 4.1 M
            Repo : epel
            Summary : Qt5 - QtDeclarative component
            URL : http://www.qt.io
            License : LGPLv2 with exceptions or GPLv3 with exceptions
            Description : Qt5 - QtDeclarative component.

            Then I said "yum whatprovides "*/qt5"" and got

            qt5-qtbase-5.5.1-11.el6.i686 : Qt5 - QtBase components
            Repo : epel
            Matched from:
            Filename : /usr/share/doc/qt5
            Filename : /usr/share/qt5
            Filename : /usr/lib/qt5

            qt5-qtbase-devel-5.5.1-11.el6.x86_64 : Development files for qt5-qtbase
            Repo : epel
            Matched from:
            Filename : /usr/include/qt5

            qt5-qtbase-5.5.1-11.el6.x86_64 : Qt5 - QtBase components
            Repo : epel
            Matched from:
            Filename : /usr/lib64/qt5
            Filename : /usr/share/doc/qt5
            Filename : /usr/share/qt5

            qt5-qtbase-devel-5.5.1-11.el6.i686 : Development files for qt5-qtbase
            Repo : epel
            Matched from:
            Filename : /usr/include/qt5

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

              You need to install qt5-qtdeclarative-devel. For that matter install all devel packages for Qt 5 you'll be ready for the future ;)

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

              eric-rktE 1 Reply Last reply
              0
              • SGaistS SGaist

                You need to install qt5-qtdeclarative-devel. For that matter install all devel packages for Qt 5 you'll be ready for the future ;)

                eric-rktE Offline
                eric-rktE Offline
                eric-rkt
                wrote on last edited by
                #7

                That did it. Thank you, SGaist.

                I am still unable to start the Qt Quick "Hello World" app by clicking on the green triangle at the lower left of the Qt Creator screen, but I can start it with Tools->External->Qt Quick->... (qmlscene) which I couldn't do before.

                There certainly is a LOT (!!!) of devel stuff that doesn't get installed by default. Where is the best place to go where this level of detail in Qt installations is discussed clearly? Obviously I haven't found the best source of Qt docs yet.

                Thanks...

                Eric

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

                  You can take a look at Qt's own documentation to have an overview of the modules available. As for what to install exactly, it depends greatly on the package manager of your distribution. There might be a "qt-5-devel" package somewhere that will pull in all the dependencies needed, but it's something you have to check with yum.

                  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

                  • Login

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