QCombobox向下箭头图像 [英] QCombobox down arrow image

查看:1378
本文介绍了QCombobox向下箭头图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改Qcombobox向下箭头图片?
现在我使用这个QSS代码,但这不工作,我不能删除向下箭头边框。

How to change Qcombobox down arrow image? Right now I'm using this QSS code, but this doesn't work, I can't remove down arrow border.

QComboBox
{
    border: 0px;
}

QComboBox::down-arrow
{   
    border: 0px;
    background-repeat: no-repeat;
    background-position: center center;
    background-image-width: 50px;
    border-image: url(./select-BG.png);
    heidth:50px;
    width:100px;
}

以下是屏幕截图:

推荐答案

箭头在按钮上,该按钮的样式由 ::下拉子控件控制。因此,要删除边框,您可以使用:

The arrow is on a button whose style is controlled by the ::drop-down subcontrol. So, to remove the border you can use:

QComboBox::drop-down 
{
    border: 0px;
}

这篇关于QCombobox向下箭头图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆