C++/QML - QDeclarativeView default background
I've today played with QML&C++/Qt and it is really interesting, but I have one "tiny" problem :)
How I can set QDeclarativeView widget to default system background color?
I've attached screenshot of window with my small app. QDeclararitiveView has white background, this is wrong, better will be default system color scheme color…
Is this possible?
stibi, you can get it from QPalette and provide to QML through context property and after this use it as value of color property of Rectangle.
[quote author="Denis Kormalev" date="1293400319"]stibi, you can get it from QPalette and provide to QML through context property and after this use it as value of color property of Rectangle.[/quote]
Why? QML already has its own element: SystemPalette
ixSci, didn't use it and was not aware about this element :) using SystemPalette element of course is easier than my way.
thank you, it works great. I was thinking about this solution before, but I thought that could exist different solution on QML level. Anyway, it works :)
stibi, just use what ixSci said. It is the solution on QML level.
Ouch, my bad. I didn't notice ixSci's reply. Great, this is exactly what i looking for.
Thanks also solved a problem i had.