您的位置:首页 > 游戏 > 游戏 > 人人秀h5制作教程_住建房官网查询_百度搜索引擎的特点_百度seo优化方法

人人秀h5制作教程_住建房官网查询_百度搜索引擎的特点_百度seo优化方法

2024/10/5 17:22:01 来源:https://blog.csdn.net/KuaiKKyo/article/details/142622236  浏览:    关键词:人人秀h5制作教程_住建房官网查询_百度搜索引擎的特点_百度seo优化方法
人人秀h5制作教程_住建房官网查询_百度搜索引擎的特点_百度seo优化方法

1.实现登录界面

头文件

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>class Widget : public QWidget
{Q_OBJECTpublic:Widget(QWidget *parent = nullptr);~Widget();
};
#endif // WIDGET_H

源文件

#include "widget.h"
#include <QIcon>
#include <QPushButton>
#include <QLabel>
#include <QMovie>
#include <QLineEdit>Widget::Widget(QWidget *parent): QWidget(parent)
{this->setWindowTitle("Metal Gear Solid V");this->setWindowIcon(QIcon("D:/Game/1.png"));this->setFixedSize(600,800);this->setStyleSheet("background-color:black");QPushButton *ptr1 = new QPushButton("登录",this);ptr1->resize(100,40);ptr1->move(120,700);ptr1->setStyleSheet("background-color: white; color: black;");QPushButton *ptr2 = new QPushButton("取消",this);ptr2->resize(100,40);ptr2->move(400,700);ptr2->setStyleSheet("background-color: white; color: black;");QLabel *ptr3 = new QLabel(this);ptr3->resize(600,300);ptr3->move(0,0);QMovie *movie = new QMovie("D:/Game/2.gif");ptr3->setMovie(movie);movie->start();ptr3->setScaledContents(true);QLabel *ptr4 = new QLabel("账号:",this);ptr4->move(ptr1->x(),ptr1->y()-200);ptr4->resize(100,40);ptr4->setStyleSheet("color: white;");QLabel *ptr5 = new QLabel("密码:",this);ptr5->move(ptr1->x(),ptr1->y()-150);ptr5->resize(100,40);ptr5->setStyleSheet("color: white;");QLineEdit *ptr6 = new QLineEdit(this);ptr6->resize(300,40);ptr6->move(ptr4->x()+50,ptr4->y());ptr6->setStyleSheet("color: white;");QLineEdit *ptr7 = new QLineEdit(this);ptr7->resize(300,40);ptr7->move(ptr5->x()+50,ptr5->y());ptr7->clear();ptr7->setPlaceholderText("输入密码");ptr7->setStyleSheet("color: white;");ptr7->setEchoMode(QLineEdit::Password);
}
Widget::~Widget()
{
}

主函数
 

#include "widget.h"#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);Widget w;w.show();return a.exec();
}

思维导图

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com