06-25-2012 12:17 AM
Hey All, trying to change the textsize of a label in a custom control. Typically I just use a property alias to define the property from the customControl that I want to change but in this case the alias textSize: label.textStyle.size is clearly not going to work, is there any way to accomplish this? Thanks.
Solved! Go to Solution.
06-25-2012 03:47 AM
can you give a code snippet to show how you are trying to do this.
06-25-2012 07:23 AM
Have you tried this ? :
----------------------------
property alias textSize: tsd.size
Label {
textStyle
{
base: tsd.style
}
attachedObjects: [
TextStyleDefinition
{
id: tsd
base: SystemDefaults.TextStyles.BodyText
fontWeight: FontWeight.Bold
}
]
} //Label
----------------------
Hope this works for you !
06-25-2012 08:54 AM
worked like a charm! I'll look into attachedobjects more that was very helpful thanks.