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!

Page { title: "Integrate C++ and QML" Column { // ... // Example 2: Custom QML Type implemented with C++ // NOTE: This type is declared in main.cpp and available after using "import com.yourcompany.xyz 1.0" MyQMLType { id: typeFromCpp // 2.1: Property Binding for MyQMLType::message property // NOTE: Similar to types created purely with QML, you may use property bindings to keep your property values updated message: "counter / 2 = " + Math.floor(myGlobalObject.counter / 2) // 2.2: Reacting to property changes // NOTE: With the onMessageChanged signal, you can add code to handle property changes onMessageChanged: console.log("typeFromCpp message changed to '" + typeFromCpp.message+"'") // 2.3: Run code at creation of the QML component // NOTE: The Component.onCompleted signal is available for every QML item, even for items defined with C++. // The signal is fired when the QML Engine creates the item at runtime. Component.onCompleted: myGlobalObject.counter = typeFromCpp.increment(myGlobalObject.counter) } // 2.1: Show typeFromCpp.message value, which is calculated automatically based on the myGlobalObject.counter value AppText { text: "Custom QML Type Message:\n" + typeFromCpp.message } }

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