QtOnAndroid
QMLGPS
← QML Example | ● | QML WebView Example →
Now we can create more interesting QML applications.
For example a GPS locator:
import QtQuick 2.0 import QtPositioning 5.3 Rectangle { color: "green" PositionSource { id: gps preferredPositioningMethods: PositionSource.SatellitePositioningMethods updateInterval: 1000 // ms active: true } Text { anchors.centerIn: parent font.pointSize: 10 color: "white" text: "Lat/Lon = "+gps.position.coordinate.latitude + "/" + gps.position.coordinate.longitude visible: gps.valid && gps.position.latitudeValid && gps.position.longitudeValid } }
Full source code:
svn co svn://schorsch.efi.fh-nuernberg.de/qt-android/simplegps
← QML Example | ● | QML WebView Example →