dynamic Text in Rectangle
Unsolved
QML and Qt Quick
-
Goodmorning,
i need to create dynamic text and change it in runtime...i can do this without problems, but now i need to have a text with background color!
normally i use a text in rectangle and i create it dynamically as:Rectangle {
color: "#808080" Text { font.pixelSize: 50; } width: childrenRect.width height: childrenRect.height
}
when i refer to this i have a rectangle object back, but i can't to handle Text!!
-
@RobyS said in dynamic Text in Rectangle:
when i refer to this i have a rectangle object back, but i can't to handle Text!!
I interpret this as you want to access the text property, but from the outside you only see the properties of the rectangle ?
Rectangle { property alias text: textId.text color: "#808080" Text { id:textId font.pixelSize: 50; } width: childrenRect.width height: childrenRect.height }