Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Help installing Qt Location

    General and Desktop
    4
    17
    7633
    Loading More Posts
    • 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
      sandybisaria last edited by

      I have downloaded Qt Location from the website but am unsure where to go from here. How do I add the module to Qt?

      1 Reply Last reply Reply Quote 0
      • JKSH
        JKSH Moderators last edited by

        Hi,

        Which feature of Qt Location are you looking for?

        Qt Location has not been released yet. A small part of it has been split off into the Qt Positioning module: http://doc-snapshot.qt-project.org/qt5-stable/location-positioning-cpp.html -- this module will be released in Qt 5.2. You can use it by installing the "Qt 5.2 beta":http://download.qt-project.org/development_releases/qt/5.2/5.2.0-beta1/

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply Reply Quote 0
        • S
          sandybisaria last edited by

          I am looking for the Positioning API. I'll try using Qt 5.2 beta.

          1 Reply Last reply Reply Quote 0
          • S
            sandybisaria last edited by

            I'm trying to test the weatherinfo example, and it doesn't seem to be able to find my location.

            1 Reply Last reply Reply Quote 0
            • JKSH
              JKSH Moderators last edited by

              Do you have GPS plugged in, and drivers installed? Note: That example only shows 4 cities: Brisbane, Oslo, Helsinki, and New York

              Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

              1 Reply Last reply Reply Quote 0
              • S
                sandybisaria last edited by

                No, but I have found an alternative solution that does not need Qt Location. But thanks for the advice anyway.

                1 Reply Last reply Reply Quote 0
                • J
                  jraichouni last edited by

                  Hi!

                  Just installed "Qt 5.2.0 beta 1":http://download.qt-project.org/development_releases/qt/5.2/5.2.0-beta1/qt-mac-opensource-5.2.0-beta1-clang-offline.dmg but it is not possible to perform

                  @import QtLocation 5.0@

                  in a qml file.
                  What preparation is needed to be able to use QtLocation in Qt 5.2?
                  Is it going to be accessible without any build from source steps, therefore integrated in the complete framework downloads for a desired target system!?

                  I needed to manually consider the submodules (e.g. qt3d and qtlocation) before build from source process for Qt 5.0.1 to use QtLocation. This was really time-consuming and is currently not possible (see below).

                  Best regards
                  jraichouni

                  P.S.
                  The build of 5.2.0 on OSX 10.9 (Mavericks) does currently not work as OSX 10.9 is currently unsupported (mkspec) and crashes after hacking this hard coded limitation for the OSX version for instance.

                  But is a build from source needed to use QtLocation in Qt5.2.0?

                  1 Reply Last reply Reply Quote 0
                  • JKSH
                    JKSH Moderators last edited by

                    Hi jraichouni,

                    Qt Location and Qt 3D have not been released yet, and will not be part of Qt 5.2 either. If you want those, you'll need to build them yourself.

                    Only Qt Positioning will be released in Qt 5.2.

                    For Mavericks, try the Release Candidate candidate (not a typo): http://download.qt-project.org/snapshots/qt/5.2/5.2.0-rc1/2013-11-26_172/

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply Reply Quote 0
                    • J
                      jraichouni last edited by

                      Hi JKSH!

                      Thanks for your quick reply!

                      I am going to try the build of the release candidate.

                      Do you know, why QtLocation is not going to be part of Qt 5.2?

                      Is there any documentation for the needed steps to build non-standard submodules into the framework?
                      I have in mind, that there was something like

                      1. git clone the submodule(s)
                      2. Edit the file .gitmodules
                      3. Step into the sumodule(s) directories to explicetly perform make all for each of the modules etc.

                      It would help to find any explanation of the exact process needed to completely integrate additional available submodules being not considered in the default build configuration.

                      Best regards from Germany
                      jraichouni

                      1 Reply Last reply Reply Quote 0
                      • JKSH
                        JKSH Moderators last edited by

                        You're welcome. :)

                        Qt Location is not going to be part of Qt 5.2 because the module is not ready yet. It still needs to be polished to reach a good quality before it is released. The same goes to other modules like Qt 3D, Qt Versit, Qt JSON DB, etc.

                        These modules were polished and released as part Qt 5.2: Qt NFC, Qt Bluetooth, Qt Positioning, Qt Windows Extras, Qt Mac Extras, Qt Android Extras.

                        Which part of Qt Location do you want? Is "Qt Positioning":http://doc-snapshot.qt-project.org/qt5-stable/qtpositioning-index.html enough? If so, you don't need to build anything -- just install Qt 5.2

                        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                        1 Reply Last reply Reply Quote 0
                        • A
                          AlterX last edited by

                          [quote author="JKSH" date="1385602544"]
                          Which part of Qt Location do you want? Is "Qt Positioning":http://doc-snapshot.qt-project.org/qt5-stable/qtpositioning-index.html enough? If so, you don't need to build anything -- just install Qt 5.2[/quote]

                          Are you sure?
                          I am using Qt 5.2 stable snapshot 9th December and even positioning module is valid, it doesn't create a valid QGeoPositionSource...

                          Qt Ambassador
                          Real-time cooperative teams: http://www.softairrealfight.net
                          Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                          https://codereview.qt-project.org/...

                          1 Reply Last reply Reply Quote 0
                          • JKSH
                            JKSH Moderators last edited by

                            Hi AlterX,

                            What platform are you running? Qt Positioning isn't supported on Android yet: http://www.kdab.com/qt-on-android-episode-1/

                            If it's another platform, do you have the GPS hardware connected and appropriate drivers installed?

                            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                            1 Reply Last reply Reply Quote 0
                            • A
                              AlterX last edited by

                              I know it's not yet supported on Android...I had to rebuilt positioning by myself.

                              Qt Ambassador
                              Real-time cooperative teams: http://www.softairrealfight.net
                              Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                              https://codereview.qt-project.org/...

                              1 Reply Last reply Reply Quote 0
                              • J
                                jraichouni last edited by

                                Hi!

                                Currently I have Qt5.2.0 installed on OSX.

                                My try to build QtLocation fails :-(

                                My proceeding:

                                1. Install binaries and sources of Qt5.2.0
                                2. cd into $QTDIR/../Src
                                3. git clone git://gitorious.org/qt/qtlocation.git
                                4. cd qtlocation
                                5. qmake -r
                                6. make -j 4 all

                                make ends up with the following error:
                                @In file included from positionpollfactory.cpp:42:
                                ./positionpollfactory.h:46:10: fatal error: 'QGeoPositionInfoSourceFactory' file not found
                                #include <QGeoPositionInfoSourceFactory>
                                ^@

                                It would be great to get an explanation on how to build QtLocation!

                                Cheers
                                jraichouni

                                1 Reply Last reply Reply Quote 0
                                • A
                                  AlterX last edited by

                                  Pleae refer to my thread on bug track:
                                  "qt location":https://bugreports.qt-project.org/browse/QTBUG-35278

                                  Qt Ambassador
                                  Real-time cooperative teams: http://www.softairrealfight.net
                                  Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

                                  https://codereview.qt-project.org/...

                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    jraichouni last edited by

                                    Hi!

                                    I tried that without success:

                                    1. Open /Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/qtlocation.pro in Qt Creator
                                    2. Run Build -> Run qmake (exits normally)
                                    3. Run Build -> Build project "qtlocation"

                                    No. 3) Outputs:

                                    @15:11:06: Starting: "/usr/bin/make"

                                    (...)

                                    /Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/src/positioning/qgeopositioninfosource.cpp:470:10: fatal error: 'moc_qgeopositioninfosource.cpp' file not found
                                    #include "moc_qgeopositioninfosource.cpp"
                                    ^
                                    1 error generated.
                                    make[3]: *** [.obj/release/qgeopositioninfosource.o] Error 1
                                    make[2]: *** [release-all] Error 2
                                    make[1]: *** [sub-positioning-make_first-ordered] Error 2
                                    make: *** [sub-src-make_first] Error 2
                                    15:11:12: The process "/usr/bin/make" exited with code 2.
                                    Error while building/deploying project qtlocation (kit: Desktop Qt 5.2.0 clang 64bit)
                                    When executing step 'Make'@

                                    It would be great to get a small step by step explanation like:

                                    1. Download and install Qt5.2.0 including the sources
                                    2. Change into directory ~/Qt5.2.0/5.2.0/Src/qtlocation
                                    3. Run qmake -r -spec macx-clang CONFIG+=x86_64
                                    4. Run make

                                    This results into:
                                    @
                                    /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.Release all
                                    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DTOUCH_EVENT_WORKAROUND -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_QML_LIB -DQT_POSITIONING_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/mkspecs/macx-clang -I. -I. -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQuick.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQuick.framework/Versions/5/Headers/5.2.0 -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQuick.framework/Versions/5/Headers/5.2.0/QtQuick -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQml.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQml.framework/Versions/5/Headers/5.2.0 -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtQml.framework/Versions/5/Headers/5.2.0/QtQml -I../../../lib/QtPositioning.framework/Versions/5/Headers -I../../../lib/QtPositioning.framework/Versions/5/Headers/5.3.0 -I../../../lib/QtPositioning.framework/Versions/5/Headers/5.3.0/QtPositioning -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers/5.2.0 -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers/5.2.0/QtCore -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtNetwork.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtGui.framework/Versions/5/Headers -I.moc/release -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers -F/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib -F/Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/lib -o .obj/release/locationsingleton.o locationsingleton.cpp
                                    locationsingleton.cpp:158:12: error: no matching conversion for functional-style cast from 'QList<QGeoCoordinate>' to 'QGeoRectangle'
                                    return QGeoRectangle(internalCoordinates);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    /Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtPositioning.framework/Headers/qgeorectangle.h:58:5: note: candidate constructor not viable: no known conversion from 'QList<QGeoCoordinate>' to 'const QGeoRectangle' for 1st argument
                                    QGeoRectangle(const QGeoRectangle &other);
                                    ^
                                    /Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtPositioning.framework/Headers/qgeorectangle.h:59:5: note: candidate constructor not viable: no known conversion from 'QList<QGeoCoordinate>' to 'const QGeoShape' for 1st argument
                                    QGeoRectangle(const QGeoShape &other);
                                    ^
                                    /Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtPositioning.framework/Headers/qgeorectangle.h:55:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
                                    QGeoRectangle();
                                    ^
                                    /Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtPositioning.framework/Headers/qgeorectangle.h:56:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
                                    QGeoRectangle(const QGeoCoordinate &center, double degreesWidth, double degreesHeight);
                                    ^
                                    /Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtPositioning.framework/Headers/qgeorectangle.h:57:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
                                    QGeoRectangle(const QGeoCoordinate &topLeft, const QGeoCoordinate &bottomRight);
                                    ^
                                    1 error generated.
                                    make[4]: *** [.obj/release/locationsingleton.o] Error 1
                                    make[3]: *** [release-all] Error 2
                                    make[2]: *** [sub-positioning-make_first] Error 2
                                    make[1]: *** [sub-imports-make_first-ordered] Error 2
                                    make: *** [sub-src-make_first] Error 2
                                    @

                                    Reger to my next post on the next page! (had to Split it because of ist length)

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jraichouni last edited by

                                      I tried is:

                                      1. cd into ~/Qt5.2.0/5.2.0/Src
                                      2. mv qtlocation qtlocation.bak
                                      3. git clone git://gitorious.org/qt/qtlocation.git
                                      4. cd qtlocation
                                      5. qmake -r -spec macs-clang CONFIG+=x86_64
                                      6. make

                                      It fails:
                                      @
                                      /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.Release all
                                      /Users/jamil/Qt5.2.0/5.2.0/clang_64/bin/moc -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_POSITIONING_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D__APPLE__ -D__GNUC__=4 -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/mkspecs/macx-clang -I. -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtGui.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers -I.moc/release -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers -F/Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/lib -F/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib qgeoareamonitor_polling.h -o .moc/release/moc_qgeoareamonitor_polling.cpp
                                      /Users/jamil/Qt5.2.0/5.2.0/clang_64/bin/moc -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_POSITIONING_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D__APPLE__ -D__GNUC__=4 -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/mkspecs/macx-clang -I. -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtGui.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers -I.moc/release -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers -F/Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/lib -F/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib qgeoareamonitor_polling.cpp -o .moc/release/qgeoareamonitor_polling.moc
                                      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_POSITIONING_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/mkspecs/macx-clang -I. -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtGui.framework/Versions/5/Headers -I/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib/QtCore.framework/Versions/5/Headers -I.moc/release -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers -F/Users/jamil/Qt5.2.0/5.2.0/Src/qtlocation/lib -F/Users/jamil/Qt5.2.0/5.2.0/clang_64/lib -o .obj/release/qgeoareamonitor_polling.o qgeoareamonitor_polling.cpp
                                      In file included from qgeoareamonitor_polling.cpp:42:
                                      ./qgeoareamonitor_polling.h:45:10: fatal error: 'qgeoareamonitorsource.h' file not found
                                      #include <qgeoareamonitorsource.h>
                                      ^
                                      1 error generated.
                                      make[5]: *** [.obj/release/qgeoareamonitor_polling.o] Error 1
                                      make[4]: *** [release-all] Error 2
                                      make[3]: *** [sub-positionpoll-make_first] Error 2
                                      make[2]: *** [sub-position-make_first] Error 2
                                      make[1]: *** [sub-plugins-make_first-ordered] Error 2
                                      make: *** [sub-src-make_first] Error 2
                                      @

                                      Every try ends up in a different error and I do not have any idea what I should do
                                      to get qtlocation being built!?

                                      Cheers
                                      jraichouni

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post