Set Qml TabBar tab color?

Viewed 6215

I tried this code to set TabBar tab background color but only selected tab color is changed. How can I set color for other tabs? Also, how can I set text color for tabs?

TabBar {
    id: tabBar

    currentIndex: swipeView.currentIndex

    background: Rectangle {
        color: "#f4d37c"
    }

    TabButton {
        id: cardsTabButton
        height: Style.line2Height
        text: qsTr("Cards")
    }

    TabButton {
        id: errorsTabButton
        height: Style.line2Height
        text: qsTr("Errors")
    }
}

Result of the code (left tab is selected)

1 Answers
Related