gpt4 book ai didi

c++ - QComboBox 文本颜色没有按预期更改

转载 作者:行者123 更新时间:2023-11-28 06:42:28 25 4
gpt4 key购买 nike

<分区>

我有一个简单的 QComboBox,但我不知道如何更改所选元素的文本颜色。它保持黑色,但它应该是白色的。我使用了颜色:白色;属性,但它似乎只影响弹出项列表的颜色。

这是我当前的样式表:

background: rgb(61,61,61);
color: rgb(255,255,255);
selection-color: rgb(255, 255, 255);

QComboBox 一直有这种行为:

enter image description here

enter image description here

如您所见,所选元素仍然具有未指定的黑色。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com