judes

1、使用QSS出现很多问题

2、方法

this->setAutoFillBackground(true);
QPalette palette = this->palette();
palette.setBrush(QPalette::Window,QBrush(QPixmap(":/LHTFDES/Resources/set.jpg").scaled(this->size(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)));// 使用平滑的缩放方式
this->setPalette(palette);// 给widget加上背景图

 

分类:

技术点:

相关文章:

  • 2021-11-24
  • 2021-07-25
  • 2021-06-26
  • 2021-07-11
  • 2022-02-28
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-27
  • 2021-06-24
  • 2021-06-18
  • 2021-04-15
  • 2021-11-29
  • 2022-01-16
  • 2021-11-28
相关资源
相似解决方案