Horst Walter
Horst Walter

Reputation: 14081

See which part of a stylesheet is applied to particular widget

I use a global stylesheet (qss) with my Qt application. Is there a way to see which style is applied to a particular element (widget)? I can use trial and error, but it would be much easier if I could just see which style is used / applied.

The styleSheet property of the widgets themselves is empty. Is there a way to debug which style from the stylesheet is exactly applied?

Upvotes: 1

Views: 401

Answers (1)

Dmitry Sazonov
Dmitry Sazonov

Reputation: 8994

You can get only stylesheets that you applied by yourself. Qt doesn't operate stylesheets. It use QStyle + QPalette for customization. So you may look through code and understand how widgets are painted.

Upvotes: 1

Related Questions