Getting Started with Enginio using Qt Quick

Setup a Qt Quick 2 application project

Create a new Qt Quick 2 Application.

Qt Creator can be used to create a template. File ⇒ New File or Project ⇒ Applications ⇒ Qt Quick 2 Application

Initialize Enginio Client

To use Enginio's QML API, the Enginio library must be imported.

import Enginio 1.0

Initialize the EnginioClient with the backend id value, which can be copied from the Dashboard.

Go to Dashboard ⇒ The Backend home-view ⇒ See ’Keys box’ ⇒ Copy backend id value.

EnginioClient {
    id: enginio
    backendId: "YOUR_OWN_BACKEND_ID"
}

Store the First Object

Now an object can be stored with Enginio. First, create an object in JSON format and fill it with data as needed. Then call create on the client with the JSON object as a parameter.

Component.onCompleted: {
    var city = {
        objectType: "objects.city",
        name: "Helsinki",
        population: 606000
    };
    enginio.create(city);
}

Check the Enginio dashboard for the newly created object.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/archives/qt-5.6/enginio-qml.html