gpt4 book ai didi

c++ - 这个元素在 c++ Qt 中被称为什么?

转载 作者:行者123 更新时间:2023-11-30 01:43:14 25 4
gpt4 key购买 nike

我正在为我的程序制作一个 GUI,目前正试图找出这个组件的名称。

Image

有谁知道这会叫什么或者我怎样才能达到这种效果?

最佳答案

从 Qt Designer 工具箱窗口将 QListWidget 添加到您的 ui 窗体。然后右键单击它,然后单击 changeStylesheet... 然后粘贴:

QListWidget {
color:white;
border:1px solid transparent;
border-radius:10px;
padding:0px;
background:#F6911B;
show-decoration-selected: 1;
}

QListWidget::item{
border-top:1px solid #E98919;
padding: 15px;
}

QListWidget::item:hover {
border-top:1px solid #E98919;
background-color: #F6911B;
color:white;
}

QListWidget::item:selected:!active {
border-top:1px solid #E98919;
background-color:white;
color:#F6911B;
}

看起来像这样:

screenshot of the styled list

要了解样式表如何与 QListView 相关,请参阅 http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qlistview

关于c++ - 这个元素在 c++ Qt 中被称为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38136567/

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