On 14 May 2014, at 04:33, Jason H <scorp...@yahoo.com> wrote: > Text does not show up when used as: > > > ///MyButton.QML > import QtQuick 2.0 > import QtQuick.Controls 1.1 > import QtQuick.Controls.Styles 1.1 > > Button { > style: ButtonStyle { > background: Rectangle { > border.width: control.activeFocus ? 2 : 1 > border.color: "#888" > radius: 10 > gradient: Gradient { > GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" } > GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" } > } > } > label: Text{ > font.pixelSize: 30 > } > } > > } > } > > > > ///// Used as: > MyButton { > id: submit > width: parent.width > height: 90 > text: "Submit" > } > ///// > > Does not show "Submit" Is there a way to define a Styled button component and > just reassign the text?
It’s the label delegate of ButtonStyle that is responsible for rendering the text. Looks like you are creating a Text-element but not assigning the text: ButtonStyle { label: Text { text: control.text // <--- } } -- J-P Nurmi _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest