z644846309 |
2016-09-03 22:03 |
Ubuntu下用qss方式显示背景图片没效果
采用qss的方式,使登录界面显示背景图片,编译后没有错误,运行后没有出现背景图片,效果如下: [attachment=15717] 我的welcome.cpp中设置如下: #include <QtGui/QApplication> #include "welcome.h" #include "ui_welcome.h" #include <QFile> #include <QFrame> welcome::welcome(QWidget *parent) : QFrame(parent), ui(new Ui::welcome) { ui->setupUi(this); Warning = new warning; smartHome = new smarthome ; } ....
welcome.h设置如下: #ifndef WELCOME_H #define WELCOME_H #include <QFrame> #include <smarthome.h> #include <warning.h> namespace Ui { class welcome; }
class welcome : public QFrame { Q_OBJECT
public: explicit welcome(QWidget *parent = 0); ~welcome(); ...
welcome.ui如下: [attachment=15716]
请问怎么把右边welcome的class变成QFrame?
|
|