滚动条在pyside2中隐藏我的Qframe小部件

2024-05-14 22:28:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我在pyside聊天演示应用程序中使用QscrollArea来显示消息。你知道吗

我添加了样式表以使滚动条透明,但它仍然隐藏了我的消息。你知道吗

下面是我为滚动条编写的样式表。你知道吗

QScrollBar:vertical {
    background-color:transparent;
    width: 8px;
}
QScrollBar::handle:vertical {
    background-color: #a0a0a0;
    min-height: 25px;
    border-radius:4px;
}
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
    background-color:transparent;
}

当没有滚动条出现时,我的味精气球如下所示

enter image description here

在滚动条出现后,它如下所示。你知道吗

enter image description here


Tags: 应用程序消息lineminwidth样式表colorbackground

热门问题