Good day
integrating the Backend an error when I open the Riparazioni page:
If you want to remove the Felgo Splash & loading screen, or to use plugins for monetization, analytics, push notifications, social networks & more, generate a license key for your app here: https://felgo.com/licenseKey
qrc:/qml/VPlayApps/navigation/NavigationItem.qml:401: Unable to assign QQuickText to Page_QMLTYPE_334
qrc:/qml/VPlayApps/navigation/NavigationStack.qml:627: Unable to assign [undefined] to QQuickItem*
qrc:/qml/VPlayApps/navigation/NavigationStack.qml:640: Unable to assign [undefined] to bool
main:
#include <QApplication>
#include <FelgoApplication>
#include <backend.h>
#include <QQmlApplicationEngine>
// uncomment this line to add the Live Client Module and use live reloading with your custom C++ code
//#include <FelgoLiveClient>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
FelgoApplication felgo;
// Use platform-specific fonts instead of Felgo's default font
felgo.setPreservePlatformFonts(true);
QQmlApplicationEngine engine;
felgo.initialize(&engine);
qmlRegisterType<Backend>("io.qt.Backend", 1, 0, "Backend");
// use this during development
// for PUBLISHING, use the entry point below
felgo.setMainQmlFileName(QStringLiteral("qml/Main.qml"));
// use this instead of the above call to avoid deployment of the qml files and compile them into the binary with qt's resource system qrc
// this is the preferred deployment option for publishing games to the app stores, because then your qml files and js files are protected
// to avoid deployment of your qml files and images, also comment the DEPLOYMENTFOLDERS command in the .pro file
// also see the .pro file for more details
// felgo.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.qml"));
engine.load(QUrl(felgo.mainQmlFileName()));
// to start your project as Live Client, comment (remove) the lines "felgo.setMainQmlFileName ..." & "engine.load ...",
// and uncomment the line below
//FelgoLiveClient client (&engine);
return app.exec();
Main.qml
import Felgo 3.0
import QtQuick 2.5
App {
Navigation {
// enable both tabs and drawer for this demo
// by default, tabs are shown on iOS and a drawer on Android
navigationMode: navigationModeDrawer
NavigationItem {
title: "Home"
icon: IconType.home
NavigationStack {
id:navigationStack
ListPage {
id: page
title: "App Paolo"
ListPage {
title: "List"
model: ListModel {
ListElement {
name: "Riparazioni"
type1: "section1"
//icon: "../assets/Sprites/001.png"
page: "Riparazioni.qml"
}
ListElement {
name: "name2"
type1: "Magazzino"
// icon: "../assets/Sprites/002.png"
//page: "Page2.qml"
}
}
delegate: SimpleRow {
text: name
onSelected: navigationStack.push(Qt.resolvedUrl(page))
}
}
}
}
}
}
}
Page Riparazioni.qml
import Felgo 3.0
import QtQuick 2.0
import io.qt.Backend 1.0
Page {
id:page
title: "Riparazioni"
Backend {
id: backend
onSendCode: txtCodice.text = code
onSendPCosto:txtPCosto.text = p_pCosto
onSendPPubblico:txtPPub.text = p_pPubblico
}
Row {
id: row1
height: 50
anchors.right: parent.right
anchors.rightMargin: 5
anchors.left: parent.left
anchors.leftMargin: 5
anchors.top: parent.top
anchors.topMargin: 3
Rectangle {
id: rectangle_Search
height: 44
color: "#4b4b4b"
radius: 7
anchors.top: parent.verticalCenter
anchors.topMargin: -25
anchors.left: parent.left
anchors.right: parent.right
AppText {
id:lbl_SearchCode
color: "#0a0808"
text: qsTr("Codice")
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 4
font.pixelSize: 12
}
AppTextEdit {
id: c_Txt_codice
y: 0
width: 50
height: 20
anchors.verticalCenter: parent.verticalCenter
anchors.bottom: parent
anchors.bottomMargin: 0
anchors.left: lbl_SearchCode.right
anchors.leftMargin: 20
}
AppButton {
id: btnSearchKey
x: 583
y: 3
text: "S"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 5
anchors.top: parent.verticalCenter
anchors.topMargin: -22
onClicked: {
backend.connectClicked()
backend.sendSearch(1,parseInt(c_Txt_codice.text))
}
}
}
}
Row {
id: row2
height: 200
anchors.right: parent.right
anchors.rightMargin: 3
anchors.left: parent.left
anchors.leftMargin: 3
anchors.top: row1.bottom
anchors.topMargin: 2
Rectangle{
id: rectangle_Articolo
color: "#848484"
radius: 18
anchors.fill: parent
AppText{
id: lbl_NBusta
color: "#ebedef"
text: "N°Busta"
anchors.left: parent.left
anchors.leftMargin: 5
anchors.top: parent.top
anchors.topMargin: 10
}
AppTextEdit {
id: txtCodice
width: 40
height: 18
anchors.top: parent.top
anchors.topMargin: 10
anchors.left: lbl_NBusta.right
anchors.leftMargin: 30
}
AppText {
id: lbl_PCosto
x: 5
y: -1
color: "#ebedef"
text: "Pr. Costo"
anchors.top: lbl_NBusta.bottom
anchors.topMargin: 18
anchors.left: parent.left
anchors.leftMargin: 5
}
AppTextEdit {
id: txtPCosto
y: 8
width: 40
height: 18
anchors.top: txtCodice.bottom
anchors.topMargin: 10
anchors.left: lbl_PCosto.right
anchors.leftMargin: 25
}
AppTextEdit {
id: txtPPub
x: -3
y: -47
width: 40
height: 18
anchors.top: txtPCosto.bottom
anchors.topMargin: 10
anchors.left: lbl_PCosto.right
anchors.leftMargin: 25
}
AppText {
id: lbl_pPubblioco
x: 2
y: -56
color: "#ebedef"
text: "Pr. Pub."
anchors.top: lbl_PCosto.bottom
anchors.topMargin: 17
anchors.left: parent.left
anchors.leftMargin: 5
}
AppButton {
id: btnSalva
x: 0
text: "SALVA"
anchors.top: parent.top
anchors.topMargin: 50
anchors.right: parent.right
anchors.rightMargin: 50
onClicked: {
backend.connectClicked()
backend.sendUpdateRiparazione(3,parseInt(txtCodice.text),parseFloat(txtPCosto.text),parseFloat(txtPPub.text));
}
}
}
}
}