QT 设置背景图片

//获取exe路径
qexeFullPath = QCoreApplication::applicationDirPath();
QPixmap myPix(qexeFullPath + "/../res/back.jpg");
ui.label->setPixmap(myPix);
ui.label->setScaledContents(true);

猜你喜欢

转载自blog.csdn.net/weixin_33699280/article/details/81109216