Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › Customizing AppTabButton

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18764

    Javier

    I would like to customize AppTabButton so I can have a column with icon and text. This is what I tried but I am getting the following error:

    qrc:///qml/VPlayApps/controls/quick2/AppTabButton.qml:134: TypeError: Cannot read property ‘pressed’ of null

    AppTabButton {
        id: control
        property color colorOff: Theme.tintColor
        property color colorOn: "white"
        property int   spacingContentItem: 2
        property int   fontPixelSize: 12
        property int   iconSize: 20
        property bool  showText: true
    
        readonly property color selColor: selected ? colorOn : colorOff
    
        contentItem: Column{
            id: contentItem
            anchors.fill: parent
            spacing: aIcon.visible && aText.visible ? dp(spacingContentItem) : 0
            Icon{
                id: aIcon
                anchors.horizontalCenter: parent.horizontalCenter
                size: dp(iconSize)
                color: control.selColor
                textItem.font: control.iconFont
                icon: control.tabIcon
                visible: control.showIcon
            }
            AppText{
                id: aText
                anchors.horizontalCenter: parent.horizontalCenter
                color: control.selColor
                font.pixelSize: sp(fontPixelSize)
                text: control.text
                visible: control.showText
            }
        }
    }

     

    #18769

    Günther
    Felgo Team

    Hi,

    thanks for reporting the issue!

    We’ve added a fix for this, which will be part of next update.

    Best,
    Günther

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

RSS feed for this thread

You must be logged in to reply to this topic.