[Qt-qml] Why can't I stylesheet a font?

Gregory Schlomoff gregory.schlomoff at gmail.com
Tue Jul 13 02:48:46 CEST 2010


I second that. Would be very useful to be able to create a predefined
group of properties, and then assign the group as a whole to any
object.

Something like this:

PropertyGroup {
  id:bigText
  font.face = "Arial"
  font.pointSize: 30
  color: "red"
}

Text {
  text:"Hello"
  properties: [bigText, anotherSetOfProperties]
}

On Tue, Jul 13, 2010 at 6:20 AM, Jason H <scorp1us at yahoo.com> wrote:
> I'd like to be able to do this:
>
> Font{id:third;face:"NiteClub";pointSize:30;color:"White"}
>
> Rectangle {
>    Text{text:"";font:third;anchors.top:parent.anchors.Top}
> }
>
> But I get the message "Element is not creatable".  I'd like to be able to
> specify this as a font class like a style sheet so that I can theme things, like
> with a style sheet
>
>
> The whole nomenclature of font.property, I'd expect the whole font.property to
> be short hand?
>
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>




More information about the Qt-qml mailing list