开发者

PyQt - How to import .qss file?

开发者 https://www.devze.com 2023-03-12 09:36 出处:网络
How can I import qt\'s stylesheet .qss file to application? In HTML we use <l开发者_Go百科ink type=\"text/css\" rel=\"stylesheet\" href=\"styles.css\">

How can I import qt's stylesheet .qss file to application?

In HTML we use

<l开发者_Go百科ink type="text/css" rel="stylesheet" href="styles.css">

And how it can be done in PyQt?

Or where can I read about it? Can not google it or find it in Qt's docs.


The .qss file is a simple text file. If you want to apply a style sheet to your application,
you have to load the .qss file content in a QString object
and pass it to setStyleSheet() app method.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号