Qt学习-background-image和border-image的区别
一切尽在代码里,注释都写好了 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);"));