search

Home  >  Q&A  >  body text

c++ - Qt 怎么在用ui设计时添加背景图片而且不让上面的控件继承背景图片?


我用的是样式表,但是其他控件的背景都继承了背景图片= =

ringa_leeringa_lee2803 days ago1086

reply all(3)I'll reply

  • PHPz

    PHPz2017-04-17 13:21:02

    Is there no one there? = =

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 13:21:02

    If the objectName of this control is a, then the stylesheet should be set like this

    #a {border-image: url(:/pic/blue.jpg)}

    Refer here

    reply
    0
  • 迷茫

    迷茫2017-04-17 13:21:02

    As Tong upstairs said, you can set the style for a given control by specifying the control name when setting the style. Such as .QWidget#myname{backgound:xxx;}

    reply
    0
  • Cancelreply