|
1Qter豆
[img]file:///D:\用户目录\我的文档\Tencent Files\644846309\Image\Group\_$)}CXBS9732[{3`2ST1UCT.jpg[/img][img=0,1]file:///D:\用户目录\我的文档\Tencent Files\644846309\Image\Group\_$)}CXBS9732[{3`2ST1UCT.jpg[/img][img=0,1]file:///D:\用户目录\我的文档\Tencent Files\644846309\Image\Group\_$)}CXBS9732[{3`2ST1UCT.jpg[/img]
采用qss的方式,使登录界面显示背景图片,编译后没有错误,运行后没有出现背景图片,效果如下:
我的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如下:
请问怎么把右边welcome的class变成QFrame?
|
|