一切尽在代码里,注释都写好了
QLabel *mylabel = new QLabel;
//不会自动适应图片,background-image像电脑桌面的平铺,图片尺寸不变
mylabel->setStyleSheet(QString("background-image:url(:/image/test.jpg)"));
//自动适应图片,border-image像桌面的拉伸效果,常用
mylabel->setStyleSheet(QString("border-image:url(:/image/test.jpg);"));

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2018-12-10
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
猜你喜欢
  • 2021-11-14
  • 2021-06-26
  • 2021-11-19
  • 2022-12-23
  • 2021-06-30
相关资源
相似解决方案