import QtQuick 2.15 Item { height: parent.height property alias text: id_text.text property bool makeGreen: false property bool isBold: false Text { id: id_text anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter color: { if (makeGreen) { return "#3e8740" } else { return "#505550" } } font.bold: isBold } }