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

Jason H scorp1us at yahoo.com
Tue Jul 13 05:44:53 CEST 2010


'Properties' might be confusing, 'inherits' would be even better, IMHO.

But yes, whatever the property name, inheriting one or more arbitary attribute 
sets would be very versatile. It should be trivial to implement as well. 
Gregory's impementation allows any collection of attributes, which is handy 
because 'color' is not a font proeprty, but is very likely to be specified along 
with the font.

Other names : 'apply', 'class[es]' (a la CSS), etc. 




----- Original Message ----
From: John Vilburn <john at ohanasoftware.com>
To: qt-qml at trolltech.com
Sent: Mon, July 12, 2010 8:56:30 PM
Subject: Re: [Qt-qml] Why can't I stylesheet a font?

I really like Gregory's suggested implementation.

On Jul 12, 2010, at 2:48 PM, Gregory Schlomoff wrote:

> 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
>> 
> 
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml


_______________________________________________
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