Dennis
Dennis

Reputation: 3488

CSS in Qt Creator

I can't find anything on this topic, is it possible to use CSS files in Qt or do I have to use setStyleSheet on every element I want to style?

I can't say its very maintainable if I have to write all the styles in quotes.

Upvotes: 2

Views: 2621

Answers (1)

Kaleb Pederson
Kaleb Pederson

Reputation: 46479

You can use -stylesheet to specify a stylesheet on the command line. In addition, you could load your .qss file from a file or a resource and then call setStylesheet on your QApplication instance.

Upvotes: 4

Related Questions