Hi Syed!
The Storage component is only available as part of the Felgo SDK, which requires some Felgo specific project setup. However, Felgo Components can also be used in Qt Quick Projects with some additional modifications to correctly initialize V-Pay.
To add Felgo to your Qt Quick Project, you can follow these steps (please note that Felgo SDK must be installed and available with your selected Build Kit):
- Modify your .pro file configuration to link the Felgo SDK to your project
CONFIG += v-play
- Open the main.cpp of your project and initialize Felgo (see code comments)
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <VPApplication> // 1 - include VPApplication
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
VPApplication vplay; // 2 - create VPApplication instance
QQmlApplicationEngine engine;
vplay.initialize(&engine); // 3 - initialize Felgo
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
- In your main.qml, use Felgo GameWindow as your main ApplicationWindow (required for license validation and other checks)
import Felgo 3.0
GameWindow {
licenseKey: "<your-license-key>"
// ...
}
Alternatively, you can also add a GameWindowItem instead:
import Felgo 3.0
ApplicationWindow {
// ...
GameWindowItem {
licenseKey: "<your-license-key>"
}
}
- Add a new file qml/config.json to your project resources, and configure your correct application id / version that matches your Felgo Apps licenseKey:
{
"title": "Felgo App",
"identifier": "<your app identifier>",
"orientation": "auto",
"versioncode": 1,
"versionname": "1",
"stage": "test"
}
With these changes, you should be able to include Felgo and use the Storage Component in your project.
Best,
Günther from Felgo