Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用带有QComboBox. 我尝试使用样式表设置字体大小:
QComboBox
*{font-size: 22pt}
QComboBox这确实会改变字体大小,但下拉列表中项目之间的间距最终会重叠。如何获得大字体并获得正确的行间距?
可以通过对QComboBox QAbstractItemViewQComboBox应用相关更改来更改下拉列表的样式,如下例所示:
QComboBox QAbstractItemView { color:#ccc; background-color:#333; border:none; selection-background-color:#1c1c1c; selection-color: #ccc; height: 30px; }