Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. FELGO Integration with my c++ backend
Forum Updated to NodeBB v4.3 + New Features

FELGO Integration with my c++ backend

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 609 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nio74
    wrote on 5 Apr 2019, 11:24 last edited by aha_1980 4 May 2019, 12:34
    #1

    Good day

    integrating the Backend an error when I open the Riparazioni page:

    ERROR:

    https://imgur.com/1Sq83So

    
    
    
    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));
    
    
                    }
                }
    
    
    
    
            }
    
        }
    
    }
    
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Apr 2019, 14:06 last edited by
      #2

      Hi,

      That's a question you should bring to their forum. They are not as active on this one.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      1/2

      5 Apr 2019, 11:24

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved