12-31-2012 08:05 AM - edited 12-31-2012 08:10 AM
HI I am trying to acheive some thing like the image below
But the text is also getting opaque if i change the opacity of the container in which the label is present please see the qml code below please help..
Container {
maxHeight: 300
maxWidth: 300
topPadding: 10
leftPadding: 10
layout: DockLayout {
}
// The ImageView that shows the loaded image after loading has finished without error
ImageView {
preferredWidth: parent.maxWidth
preferredHeight: parent.maxHeight
imageSource: "asset:///images/face.png"
verticalAlignment: VerticalAlignment.Fill
horizontalAlignment: HorizontalAlignment.Fill
}
Container {
preferredWidth: 300
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Bottom
background: Color.Gray
opacity: 0.5
Label {
id: headlbl
text: "test sdjf sdjkhfb sdkjfh sdjkfh sdkfhj sds sdfs sdf"
multiline: true
textStyle.color: Color.White
textStyle.fontSize: FontSize.XSmall
textStyle.fontStyle: FontStyle.Normal
textStyle.fontWeight: FontWeight.Bold
opacity: 1.0
}
}
}
How to make the container opacity less by keeping the label's opacity as 1.0
12-31-2012 08:46 AM
12-31-2012 09:06 AM
12-31-2012 09:36 AM
12-31-2012 01:52 PM - edited 12-31-2012 02:02 PM
If u will check the image in the above post is what I want to acheive .
Basically I want to do is change the opacity of the background of a container but not its childrens like in this case the label I refrain from using a transperant image as the text is dynamic and the height may increase or decrease so.
Hope I was clear enough..