[Solved] QML color as QString
QML and Qt Quick
4
Posts
2
Posters
5.7k
Views
1
Watching
-
Is it possible to set the colour of a rectangle with a QString?
I pass the string from C++ and then I want to use it like this:
Rectangle {
id: prompt_rectangle
color: inputText
anchors.fill: parent
}The string has values like "#ff0000" How can I assign that to color?
If possible, I do not want to use QColor.