肿瘤康复网,内容丰富有趣,生活中的好帮手!
肿瘤康复网 > image border-image background-image的区别

image border-image background-image的区别

时间:2018-07-11 10:36:12

相关推荐

Qt 设置样式表 加载图片时

//背景 不会自动适应图片,background-image像电脑桌面的平铺,图片尺寸不变setStyleSheet(QString("background-image:url(:/image/test.jpg)"));//背景 自动适应图片,border-image像桌面的拉伸效果,常用setStyleSheet(QString("border-image:url(:/image/test.jpg);"));//前景 自动适应图片,border-image像桌面的拉伸效果,常用setStyleSheet(QString("image:url(:/image/test.jpg);"));

QCustomplot背景自适应 拉伸

ui->customPlot->setBackground(QPixmap(":/image/error.png"),true,Qt::KeepAspectRatioByExpanding);

QCustomplot背景默认不拉伸

v ui->customPlot->setBackground(QPixmap(":/image/error.png"));

如果觉得《image border-image background-image的区别》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。