for create style for qmlobject like Rectangle is possible we define css class?
Solved
QML and Qt Quick
-
hi,you have a idea that we define css class like :
.info-rect{ color:blue; font-point:12; } .warn-rect{ color:red; font-point:8; }
i want to define class in css and i use it in qml type;
i.e.
we want to have:Rectangle{id:myrect; class:info-rect; }
do you have a solution?
-
Hi,
Styling of QML is not done through CSS, you have several possibilities explained here
Hope it helps
-
stackprogramerreplied to SGaist on 10 Jan 2016, 22:15 last edited by stackprogramer 1 Oct 2016, 22:19
-
One way would be to implement a styling C++ class that parses your style sheet and that you would use to style your app.
-
stackprogramerreplied to SGaist on 10 Jan 2016, 22:23 last edited by stackprogramer 1 Oct 2016, 22:24
@SGaist said:
One way would be to implement a styling C++ class that parses your style sheet and that you would use to style your app.
i will examine it,thanks
1/5