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. Project ERROR: Unknown module(s) in QT: location
Forum Updated to NodeBB v4.3 + New Features

Project ERROR: Unknown module(s) in QT: location

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 3.3k Views 1 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.
  • S Offline
    S Offline
    sjcoder
    wrote on last edited by
    #1

    I have installed and am running Qt Creator 4.3.1 based on Qt 5.9.1 on Ubuntu 18.04. I have QML file says:
    import QtLocation 5.6
    import QtPositioning 5.6

    When I build, it give me this "Unknown module(s) in QT: location" error. I cannot google finding any help talking about this error.

    jsulmJ 1 Reply Last reply
    0
    • S sjcoder

      I have installed and am running Qt Creator 4.3.1 based on Qt 5.9.1 on Ubuntu 18.04. I have QML file says:
      import QtLocation 5.6
      import QtPositioning 5.6

      When I build, it give me this "Unknown module(s) in QT: location" error. I cannot google finding any help talking about this error.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @sjcoder Which Qt version do you use (please note that "based on" in "About QtCreator" dialog only says which version was used to build QtCreator).
      Also, did you add QT += location in your pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        sjcoder
        wrote on last edited by
        #3

        Yes, I have QT+=location in the pro file.

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

          Hi and welcome to devnet,

          What version of Qt are you using to build your application ?
          What you showed is the about Qt Creator dialog content which is completely unrelated to the Kit you are using to build your application.

          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
          • S Offline
            S Offline
            sjcoder
            wrote on last edited by
            #5

            From "About Qt Creator" in Help menu, it says Qt Creator 4.3.1 based on Qt 5.9.1(GCC 5.3.120160406(Red Hat 5.3.1-6), 64 bit) . Built on Jun 20 2017.
            Now the error message is :
            file:///home/qchen2/workspace/scse-gui/sse_map.qml:3:1: module "QtLocation" version 5.6 is not installed
            import QtLocation 5.6
            Am I getting wrong version QtCreator to match for QtLocation 5.6? How to install the right version of QtLocation for my creator?

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

              As already said twice, once by @jsulm and the other one by me, what is shown in this about box is completely irrelevant to the version of Qt you are using to build your application.

              As just requested, give the information about the Kit you are currently using to build your application.

              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
              1
              • S Offline
                S Offline
                sjcoder
                wrote on last edited by
                #7

                From the Build & Run Kits, it show Desktop Qt 5.9.1 64bit(default).
                /home/qchen2/Qt5.9.1/5.9.1/gcc_64/bin/qmake

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

                  Looks like it's the 5.3 version that comes with your Qt 5.9.1.

                  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
                  • S Offline
                    S Offline
                    sjcoder
                    wrote on last edited by
                    #9

                    Change to 5.3 eliminate that error. However there are new issue came up:
                    Here is my .qml file imported:
                    import QtQuick 2.0
                    import QtQuick.Window 2.0
                    import QtLocation 5.3
                    import QtPositioning 5.3

                    The new error is kind confusing to me:
                    QQuickView only supports loading of root objects that derive from QQuickItem.

                    If your example is using QML 2, (such as qmlscene) and the .qml file you
                    loaded has 'import QtQuick 1.0' or 'import Qt 4.7', this error will occur.

                    To load files with 'import QtQuick 1.0' or 'import Qt 4.7', use the
                    QDeclarativeView class in the Qt Quick 1 module.

                    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