Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Felgo Live Code Reloading: Web Editor

Run this example on your Android and iOS phone now, with the Felgo Live Scripting mobile app!

import QtQuick 2.12 import QtPositioning 5.12 import QtLocation 5.12 import Felgo 3.0 App { AppMap { id: appMap anchors.fill: parent plugin: mapboxPlugin MouseArea { anchors.fill: parent onPressAndHold: { marker.visible = false var coordinates = appMap.toCoordinate(Qt.point(mouse.x, mouse.y)) geocodeModel.query = coordinates marker.coordinate = coordinates } } MapQuickItem { id: marker visible: false //Item used as graphic sourceItem: Item { Icon { icon: IconType.mapmarker color: "red" size: dp(30) anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom } } } } Plugin { id: mapboxPlugin name: "mapbox" // configure your own map_id and access_token here parameters: [ PluginParameter { name: "mapbox.mapping.map_id" value: "mapbox.streets" }, PluginParameter { name: "mapbox.access_token" value: "pk.eyJ1IjoiZ3R2cGxheSIsImEiOiJjaWZ0Y2pkM2cwMXZqdWVsenJhcGZ3ZDl5In0.6xMVtyc0CkYNYup76iMVNQ" } ] } GeocodeModel { id: geocodeModel plugin: mapboxPlugin autoUpdate: true onLocationsChanged: { if(count > 0) { marker.visible = true var address = get(0).address addressLabel.text = address.street + " " + address.city + " " + address.country } } } AppText { id: addressLabel width: parent.width * 0.8 color: "red" anchors { top: parent.top horizontalCenter: parent.horizontalCenter topMargin: dp(20) } fontSize: 16 clip: true text: qsTr("Hold anywhere on the map to display address") } AppActivityIndicator { id: busyIndicator anchors.centerIn: parent visible: geocodeModel.status == GeocodeModel.Loading } }

1. Download Felgo Live Scripting app

2. Open the app and add the displayed Dev ID here.

QML Hot Reload on all Platforms

With Felgo Live, you can reload code changes in real-time on any connected device. While this web editor is just for demonstration purposes, you can use hot reloading also for development on your desktop.

Download the Felgo Developer App app to run your code on Android and iOS, from Windows, macOS or Linux.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded