import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 MyComboBox { model: [ { value: 0, text: "00" }, { value: 1, text: "01" }, { value: 2, text: "02" }, { value: 3, text: "03" }, { value: 4, text: "04" }, { value: 5, text: "05" }, { value: 6, text: "06" }, { value: 7, text: "07" }, { value: 8, text: "08" }, { value: 9, text: "09" }, { value: 10, text: "10" }, { value: 11, text: "11" }, { value: 12, text: "12" }, { value: 13, text: "13" }, { value: 14, text: "14" }, { value: 15, text: "15" }, { value: 16, text: "16" }, { value: 17, text: "17" }, { value: 18, text: "18" }, { value: 19, text: "19" }, { value: 20, text: "20" }, { value: 21, text: "21" }, { value: 22, text: "22" }, { value: 23, text: "23" }, ] delegate: ItemDelegate { width: parent.width text: modelData.text hoverEnabled: true contentItem: MyText { horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter text: parent.text color: parent.enabled ? "#ffffff" : "#909090" } background: Rectangle { color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d") } } }