Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › AppImage Error

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #17886

    Nicola

    Hi,

    when i open this my page

    import Felgo 3.0 as VP
    import QtQuick 2.0
    
    VP.ListPage {
        id: torneiPage
        property int clubId: 0
    
        Component.onCompleted: {
            model = [
                        { name: "Torneo A", points: "25", position: "11", date: "25/11/2017", image: VP.IconType.image,
                            id: "1"}
                    ];
        }
    
        onItemSelected: {
            console.debug("index" + index)
            navigationStack.push(torneoPageComponent, {id: model[index].id, name: model[index].name})
        }
    
        delegate: VP.SimpleRow {
            id: row
            onSelected: {
                itemSelected(index, listView.model[index])
            }
    
            VP.Icon {
                id: torneoIcon
                icon: modelData.image
                anchors.verticalCenter: parent.verticalCenter
            }
    
            VP.AppText {
                text: modelData.name
                anchors.left: torneoIcon.right
                anchors.leftMargin: dp(5)
                anchors.right: parent.right
                anchors.rightMargin: dp(5)
            }
    
            ThreeText {
                anchors.left: torneoIcon.right
                anchors.right: parent.right
                anchors.rightMargin: dp(5)
                anchors.leftMargin: dp(5)
                anchors.bottom: parent.bottom
                anchors.bottomMargin: dp(5)
                textLeft: modelData.date
                textCenter: modelData.position
                textRight: modelData.points
            }
        }
    
    }
    

    i have this message on the console, the app run right but i don’t know what’s it

    QML AppImage: Cannot open: qrc:///qml/VPlayApps/controls/

    Nicola

    #17892

    Günther
    Felgo Team

    Hi Nicola!

    The SimpleRow delegate automatically works with some default properties of your model, e.g. the image.

    It thus tries to display the image specified with the image property. You can show an icon for the SimpleRow by using the icon property instead:

        Component.onCompleted: {
          model = [
                { name: "Torneo A", points: "25", position: "11", date: "25/11/2017", icon: VP.IconType.image,
                  id: "1"}
              ];
        }

    In both cases, it is not required to manually add an Icon or Image element to the SimpleRow that shows this icon.

    Best,
    Günther

    #17896

    Nicola

    Hi,

    i have this error also if i comment “my” icon elment.

    #17900

    Günther
    Felgo Team

    Hi Nicola,

    sorry for maybe not being clear enough.

    In your model, you use:

    image: VP.IconType.image

    The SimpleRow automatically tries to display an AppImage with the specified image path, whenever there’s an image property present in your model. As the IconType is not a valid path to an image asset, this produces the error you mentioned above.

    By using

    icon: VP.IconType.image

    instead, the SimpleRow shows the specified icon and does not try to show an image.

    You can also use a completely different property name in your model, which is not handled by SimpleRow (e.g. imagePath, or myIcon). The SimpleRow documentation lists the reserved properties so you can have a look what you can use.

    Best,
    Günther

    #17901

    Nicola

    Ok, changing the name in my model i don’t see the error. What can i have a left marging for my “custom” icon object in the simple row?

    #17902

    Günther
    Felgo Team

    The built-in UI elements are only changeable via the app Theme or the SimpleRow style property. It lets you set some styling configuration like the indent and spacing of the row. These values are used for all built-in UI elements of the SimpleRow.

    In case you extend the row with custom Items, you can specify any styling or margins you want for your custom Items. If the SimpleRow is not exactly the UI that you need, you can also consider to make your own Row item from scratch. It is not required to stay with SimpleRow for every list in your app.

    Best,
    Günther

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded