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
}
}
}