From 85ce9d7905890adb3ff7e504bcae997269bf9fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Thu, 2 Mar 2023 21:00:57 +0800 Subject: Tab Item text can be overridden without overriding contentItem --- TabItem.ui.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TabItem.ui.qml b/TabItem.ui.qml index a704822..bf895d4 100644 --- a/TabItem.ui.qml +++ b/TabItem.ui.qml @@ -2,6 +2,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 Button { + id: button property int currentIndex: 0 property bool doesntEmbed: Qt.platform.os === "android" || Qt.platform.os === "linux" @@ -17,8 +18,9 @@ Button { height: 38 horizontalPadding: 16 verticalPadding: 8 + text: label contentItem: Text { - text: label + text: button.text color: index == currentIndex ? "white" : "#066ac9" font { family: doesntEmbed ? "Roboto" : regular.name -- cgit v1.2.3