D
D
DarkByte20152016-10-02 21:31:32
css
DarkByte2015, 2016-10-02 21:31:32

Classes in QSS and what kind of QML?

I have long heard that Qt has CSS, but somehow everyone could not look at it. Now I started to understand ... The question arose: what about the classes? In the designer, I did not find the ability to add classes to widgets. How do you group them then? Indeed, in CSS, classes are used first of all, and only then, much less often, id and styles for all elements. For example, 5 textboxes on the form will have the same style, it is not convenient to style them all through id. And if you apply the style to all textboxes on the form, then how to add more textboxes that already have a different style (as planned)? By the way, is it possible to somehow make the editor of the form code available for editing? It is locked, editing is written only in designer mode. But there is a simple xml, but somehow it would be easier for me to write it with my hands.
And finally, what is QML? I looked at the wiki for some kind of Qt language ... It seems to be written declarative, but the handler functions are described there, I look. Is it possible to connect it with C ++ somehow, or do you just need to write the whole project on it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2016-10-03
@Zifix

The classes here are just C ++, for each class you can set your own style.
QML is generally a different paradigm, when maximum logic is written in C ++, and the interface is entirely described in QML, preferably by hand. Roughly, you can draw an analogy with HTML, you can also prescribe handlers there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question