开发者

Where is a reference for the customizable stylesheet properties for Qt widgets?

I've been struggling with learning how to use stylesheets to customize the look of my widgets in Qt.

For example, after much effort, I just figured out that the name of the property that determines what color the text on a QComboBox drop-down menu is when it is mouse-over'd is selection-color, and the background color is selection-background-color. But most of that I discovered by random guess-and-check.

Where can I find documentation that will actually tell me these things so I don't have to guess? Does Qt follow some sort 开发者_Python百科of standard naming convention?


http://doc.qt.nokia.com/latest/stylesheet-reference.html


http://doc.qt.io/qt-5/stylesheet-examples.html

The above link gives examples for pretty much every control. For the combobox it mentions the QAbstractItemView, and mentions that you need selection-background-color etc... to style it - with an example.

It doesn't always explain what each property does however, which is where the doc that baysmith linked to comes in.

So with these two documents together you should be in good shape.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜