A
A
a2NaF2019-01-26 17:38:25
Qt
a2NaF, 2019-01-26 17:38:25

How to create your own design in Qt?

This question, probably, has already bothered many, but still, after searching the Internet, I did not find answers to my questions. How to implement my own design in Qt, for example buttons? Draw a button in advance in photoshop and paste it as an icon - a working solution or a crutch? If I need to fit the active area of ​​the widget (the zone that accepts clicks on the button, respectively) to the visible part, how can I do this?
-------
There are more useful links in the comments to create your own style

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2019-01-29
@a2NaF

Depends on what technology is being used. If QtWidgets, then we do QSS . But today it is already obsolete, and therefore it is better to use QML - in this case, you should look at how the design is implemented in the Qt Quick Controls 2 sources
. shapes, gradients, shadows, etc. And if it's an ordinary button, then it's better to do without pictures, with a combination of primitive elements.
If you write as simply as possible with your hands, then the button is just a Rectangle, inside of which lies the MouseArea, which can have a negative indent from the edges.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question