Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

What's wrong with this MouseArea logic

$
0
0
I found that if I used the following code, I encountered this error message: “Error: Unable to assign QColor to QString.” Rectangle {     anchors.fill: parent     color: "red"       Text     {         anchors.centerIn: parent         text: parent.color     } } If I modify the text property’s assignment statement as follows, it displays the HTML color code, presumably because it implicitly calls QColor::name() when appending a QString. text: parent.color + "" Just bear in mind I only did so to see the string representation of the color value.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images