add register function

master
HOJI 2 years ago
parent 7b4196485c
commit 30ab777369

@ -13,19 +13,22 @@ SOURCES += \
customer.cpp \ customer.cpp \
main.cpp \ main.cpp \
login.cpp \ login.cpp \
receptionist.cpp receptionist.cpp \
registers.cpp
HEADERS += \ HEADERS += \
administration.h \ administration.h \
customer.h \ customer.h \
login.h \ login.h \
receptionist.h receptionist.h \
registers.h
FORMS += \ FORMS += \
administration.ui \ administration.ui \
customer.ui \ customer.ui \
login.ui \ login.ui \
receptionist.ui receptionist.ui \
registers.ui
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 9.0.2, 2023-08-17T17:27:20. --> <!-- Written by QtCreator 9.0.2, 2023-09-04T01:01:27. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

@ -1,5 +1,4 @@
#include "customer.h" #include "customer.h"
#include "login.h"
#include "ui_customer.h" #include "ui_customer.h"
customer::customer(QWidget *parent) : customer::customer(QWidget *parent) :
@ -7,241 +6,9 @@ customer::customer(QWidget *parent) :
ui(new Ui::customer) ui(new Ui::customer)
{ {
ui->setupUi(this); ui->setupUi(this);
this->setFixedSize(1920,1080);
this->setWindowTitle("用户界面");
this->setWindowIcon(QIcon());
QPalette q;//调色板
q.setBrush(QPalette::Window,QBrush(QPixmap("picture/customerbackground.jpg")));
this->setPalette(q);
labelone = new QLabel(this);
labelone->setScaledContents(true);
//labelone->setPixmap(QPixmap("picture/customerbackground.jpg"));
labelone->lower();
lg = new login(this);
lg->hide();
ui->tableWidget->setColumnCount(4);//添加四列
QStringList QL;
QL << "房间号"<<"房间类型";
QL << "是否带窗";
QL << "状态";
ui->tableWidget->setHorizontalHeaderLabels(QL);//添加列头的内容
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);//列自适应,填满
addrow("曹坤","",14,"中国");//测试用
addrow("","",4,"中国");
} }
customer::~customer() customer::~customer()
{ {
delete ui; delete ui;
} }
void customer::addrow(QString name,QString gender,int age,QString bornplace){
int count = ui->tableWidget->rowCount();//获取行数
ui->tableWidget->setRowCount(count+1);
QTableWidgetItem *Q1 = new QTableWidgetItem(name);
QTableWidgetItem *Q2 = new QTableWidgetItem(gender);
QTableWidgetItem *Q3 = new QTableWidgetItem(QString::number(age));//将int转为string
QTableWidgetItem *Q4 = new QTableWidgetItem(bornplace);
Q1->setTextAlignment(Qt::AlignCenter);
Q2->setTextAlignment(Qt::AlignCenter);
Q3->setTextAlignment(Qt::AlignCenter);
Q4->setTextAlignment(Qt::AlignCenter);//内容居中对齐
ui->tableWidget->setItem(count,0,Q1);//行数 列 内容
ui->tableWidget->setItem(count,1,Q2);
ui->tableWidget->setItem(count,2,Q3);
ui->tableWidget->setItem(count,3,Q4);
}
void customer::on_checking_out1_clicked()//要连到数据库
{
QString count = ui->lineEdit->text() ;//获取行数
QString QS = "空闲";
QTableWidgetItem *Q1 = new QTableWidgetItem(QS);
int c = count.toInt();
if(c>=0){
ui->tableWidget->setItem(c,3,Q1);
Q1->setTextAlignment(Qt::AlignCenter);
QMessageBox::about(this,"提示","退房成功");
}
}
void customer::on_Reservation1_clicked()//要连到数据库
{
QString count = ui->lineEdit->text() ;//获取行数
QString QS = "占用";
QTableWidgetItem *Q1 = new QTableWidgetItem(QS);
int c = count.toInt();
if(c>=0){
ui->tableWidget->setItem(c,3,Q1);
Q1->setTextAlignment(Qt::AlignCenter);
QMessageBox::about(this,"提示","订房成功");
}
}
void customer::on_commandLinkButton_clicked()
{
this->hide();
lg->show();
}
void customer::on_toolButton_2_clicked()
{
findall();
flush_data(userinfo);
}
void customer::on_checkBox_clicked(bool checked)
{
if(checked){
ui->tableWidget->horizontalHeader()->show();
}
else ui->tableWidget->horizontalHeader()->hide();
}
void customer::on_checkBox_2_clicked(bool checked)
{
if(checked){
ui->tableWidget->verticalHeader()->show();
}
else ui->tableWidget->verticalHeader()->hide();
}
void customer::on_checkBox_3_clicked(bool checked)
{
if(checked){
ui->tableWidget->setAlternatingRowColors(true);
}
else ui->tableWidget->setAlternatingRowColors(false);
}
void customer::on_radioButton_clicked(bool checked)
{
if(checked){
ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectItems);
ui->radioButton_2->setChecked(false);
}
else {
ui->radioButton_2->setChecked(true);
on_radioButton_2_clicked(true);
}
}
void customer::on_radioButton_2_clicked(bool checked)
{
if(checked) {ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
ui->radioButton->setChecked(false);
}else {
ui->radioButton->setChecked(true);
on_radioButton_clicked(true);
}
}
void customer::findall()
{
userinfo.clear();
QSqlQuery query((db));
query.prepare("select * from hotel;");
if(query.exec())
{
while (query.next()) {
QVector<QString>rec;
for(int i=0;i<query.record().count();i++)
{
rec.push_back(query.record().value(i).toString());
}
userinfo.push_back(rec);
}
}
}
void customer::flush_data(QVector<QVector<QString>>&userinfo)
{
ui->tableWidget->clear();
if(!userinfo.size())return;
ui->tableWidget->setRowCount(userinfo.size());
ui->tableWidget->setColumnCount(4);
for(int i=0;i<userinfo.size();i++)
{
for(int j=0;j<userinfo[0].size();j++)
{
ui->tableWidget->setItem(i,j,new QTableWidgetItem(userinfo[i][j]));
}
}
ui->tableWidget->setHorizontalHeaderLabels({"房间号","房间类型","是否带窗","状态"});
}
void customer::on_tableWidget_itemClicked(QTableWidgetItem *item)
{
int row = item->row();
QString r = QString::number(row);
ui->lineEdit->setText(r);
}
void customer::on_search_clicked()
{
QString number=ui->search->text();
if(find_byname(number))
{
flush_data(userinfo);
userinfo.clear();
}else QMessageBox::critical(nullptr, "错误", "something wrong!", QMessageBox::Retry);
}
bool customer::find_byname(QString number)
{
userinfo.clear();
QSqlQuery query(db);
query.prepare("select * from users where username=:number;");
query.bindValue(":number",number);
if(query.exec())
{
while (query.next()) {
QVector<QString>rec;
rec.push_back(query.record().value("房间").toString());
rec.push_back(query.record().value("房间类型").toString());
rec.push_back(query.record().value("是否带窗").toString());
rec.push_back(query.record().value("状态").toString());
userinfo.push_back(rec);
}
return true;
}
return false;
}

@ -1,12 +1,7 @@
#ifndef CUSTOMER_H #ifndef CUSTOMER_H
#define CUSTOMER_H #define CUSTOMER_H
#include "login.h"
#include <QMainWindow> #include <QMainWindow>
#include <QLabel>
#include <QIcon>
#include <QMessageBox>
#include <QTableWidgetItem>
namespace Ui { namespace Ui {
class customer; class customer;
@ -19,44 +14,9 @@ class customer : public QMainWindow
public: public:
explicit customer(QWidget *parent = nullptr); explicit customer(QWidget *parent = nullptr);
~customer(); ~customer();
void addrow(QString name,QString gender,int age,QString bornplace);
void findall();
void flush_data(QVector<QVector<QString>>&userinfo);
bool find_byname(QString name);
private slots:
void on_checking_out1_clicked();
void on_Reservation1_clicked();
void on_commandLinkButton_clicked();
void on_toolButton_2_clicked();
void on_checkBox_clicked(bool checked);
void on_checkBox_2_clicked(bool checked);
void on_checkBox_3_clicked(bool checked);
void on_radioButton_clicked(bool checked);
void on_radioButton_2_clicked(bool checked);
void on_tableWidget_itemClicked(QTableWidgetItem *item);
void on_search_clicked();
private: private:
Ui::customer *ui; Ui::customer *ui;
QLabel *labelone;
login *lg;
QSqlDatabase db;
QVector<QVector<QString>>userinfo;
}; };
#endif // CUSTOMER_H #endif // CUSTOMER_H

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1920</width> <width>800</width>
<height>1080</height> <height>600</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,293 +17,12 @@
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>20</x> <x>0</x>
<y>-50</y> <y>0</y>
<width>1920</width> <width>1920</width>
<height>1080</height> <height>1080</height>
</rect> </rect>
</property> </property>
<widget class="QToolButton" name="Reservation1">
<property name="geometry">
<rect>
<x>1620</x>
<y>400</y>
<width>40</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>订</string>
</property>
</widget>
<widget class="QToolButton" name="checking_out1">
<property name="geometry">
<rect>
<x>1620</x>
<y>310</y>
<width>40</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>退</string>
</property>
</widget>
<widget class="QLabel" name="operation">
<property name="geometry">
<rect>
<x>1600</x>
<y>230</y>
<width>80</width>
<height>40</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>操作</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="sign">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>281</width>
<height>151</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>70</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(85, 255, 255);</string>
</property>
<property name="text">
<string>宜客酒店</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QToolButton" name="toolButton_2">
<property name="geometry">
<rect>
<x>1280</x>
<y>100</y>
<width>160</width>
<height>60</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>显示全部</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_2">
<property name="geometry">
<rect>
<x>1580</x>
<y>100</y>
<width>160</width>
<height>60</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>1470</x>
<y>100</y>
<width>81</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>房间号:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton">
<property name="geometry">
<rect>
<x>20</x>
<y>980</y>
<width>201</width>
<height>81</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>30</pointsize>
</font>
</property>
<property name="text">
<string>返回</string>
</property>
<property name="iconSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget">
<property name="geometry">
<rect>
<x>150</x>
<y>300</y>
<width>1400</width>
<height>600</height>
</rect>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>1570</x>
<y>600</y>
<width>131</width>
<height>221</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>行表头</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string>列表头</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>交替背景色</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QPushButton" name="search">
<property name="geometry">
<rect>
<x>1760</x>
<y>100</y>
<width>100</width>
<height>60</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>搜索</string>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>1350</x>
<y>190</y>
<width>211</width>
<height>101</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>当前选中的行:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>1570</x>
<y>440</y>
<width>151</width>
<height>151</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>选择单格</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>选择行</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
@ -311,8 +30,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1920</width> <width>800</width>
<height>18</height> <height>17</height>
</rect> </rect>
</property> </property>
</widget> </widget>

@ -3,6 +3,7 @@
#include "customer.h" #include "customer.h"
#include "administration.h" #include "administration.h"
#include "receptionist.h" #include "receptionist.h"
#include "registers.h"
login::login(QWidget *parent) login::login(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
@ -122,3 +123,10 @@ void login::on_btn_login_clicked()
} }
} }
void login::on_btn_register_clicked()
{
registers *reg = new registers;
reg->show();
}

@ -35,6 +35,8 @@ private slots:
void on_btn_login_clicked(); void on_btn_login_clicked();
void on_btn_register_clicked();
private: private:
Ui::login *ui; Ui::login *ui;
QLabel *bg; QLabel *bg;

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

@ -0,0 +1,129 @@
#include "registers.h"
#include "ui_registers.h"
registers::registers(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::registers)
{
ui->setupUi(this);
QIcon logo(":/image/icon/logo.png");
this->setWindowIcon(logo);
setWindowTitle("宜客酒店");
this->setFixedSize(800,600);
bg = new QLabel(this);
bg->setScaledContents(true);
bg->setPixmap(QPixmap(":/image/bg/register.jpg"));
bg->lower();
ui->lineEdit_password->setEchoMode(QLineEdit::Password);
ui->lineEdit_password_r->setEchoMode(QLineEdit::Password);
ui->radioButton_M->setChecked(1);
db = QSqlDatabase::addDatabase("QMYSQL");
db.setDatabaseName("hotel");
db.setHostName("localhost");
db.setPort(3306);
db.setUserName("root");
db.setPassword("111111");
if(db.open()){
qDebug("database connect succeed");
}else{
qDebug("database connect failed");
}
}
registers::~registers()
{
delete ui;
}
void registers::paintEvent(QPaintEvent*)
{
bg->resize(ui->widget->size());
}
bool registers::verify(int x){
if(x==1){//账号(手机号)判别
if(ui->lineEdit_account->text().size()!=11){
return false;
}else{
QString str = ui->lineEdit_account->text();
for(int i=0;i<11;i++){
if(str.at(i)!='1'&&str.at(i)!='2'&&str.at(i)!='3'&&str.at(i)!='4'&&str.at(i)!='5'&&str.at(i)!='6'&&str.at(i)!='7'&&str.at(i)!='8'&&str.at(i)!='9'&&str.at(i)!='0'){
return false;
}
}
return true;
}
}else if(x==2){//密码判别
if(ui->lineEdit_password->text().size()<6||ui->lineEdit_password->text().size()>16){
return false;
}else{
QString str = ui->lineEdit_password->text();
int num = str.size();
for(int i=0;i<num;i++){
if(!(std::isalnum(str.at(i).unicode()))){
return false;
}
}
return true;
}
}else if(x==3){//密码二次输入判别
if(QString::compare(ui->lineEdit_password->text(),ui->lineEdit_password_r->text())==0){
return true;
}else{
return false;
}
}else if(x==4){//姓名判别
if(ui->lineEdit_name->text().size()>14||ui->lineEdit_name->text()==NULL){
return false;
}else{
return true;
}
}else if(x==5){//身份证号判别
if(ui->lineEdit_id->text().size()!=18){
return false;
}else{
QString str = ui->lineEdit_id->text();
int num = str.size();
for(int i=0;i<num;i++){
if(str.at(i)!='1'&&str.at(i)!='2'&&str.at(i)!='3'&&str.at(i)!='4'&&str.at(i)!='5'&&str.at(i)!='6'&&str.at(i)!='7'&&str.at(i)!='8'&&str.at(i)!='9'&&str.at(i)!='0'&&str.at(i)!='X'){
return false;
}
}
return true;
}
}else{
return false;
}
}
void registers::on_pushButton_clicked()
{
if(!verify(1)){
QMessageBox::warning(this, tr("提示"), tr("请检查账号是否符合规范,目前仅限中国大陆用户注册,手机号应为+86 11位号码"));
}else if(!verify(2)){
QMessageBox::warning(this, tr("提示"), tr("请检查密码是否符合规范密码应由6-16位字母或数字组成"));
}else if(!verify(3)){
QMessageBox::warning(this, tr("提示"), tr("两次输入密码不相同,请重新输入!"));
}else if(!verify(4)){
QMessageBox::warning(this, tr("提示"), tr("姓名字数为空或超出,请重新输入!"));
}else if(!verify(5)){
QMessageBox::warning(this, tr("提示"), tr("请检查身份证信息是否符合规范并重新输入!\n请注意X为大写字母"));
}else{
sign_in();
QMessageBox::information(this, tr("提示"), tr("注册成功!"));
this->hide();
}
}
void registers::sign_in(){
QString gender;
if(ui->radioButton_M->isChecked()){
gender = "";
}else{
gender = "";
}
QString sql = QString("INSERT INTO customer VALUES('%1','%2','%3','%4','%5',NULL);").arg(ui->lineEdit_account->text()).arg(ui->lineEdit_password->text()).arg(ui->lineEdit_name->text()).arg(gender).arg(ui->lineEdit_id->text());
QSqlQuery query;
query.exec(sql);
}

@ -0,0 +1,38 @@
#ifndef REGISTERS_H
#define REGISTERS_H
#include <QMainWindow>
#include <QLabel>
#include <QDebug>
#include <QString>
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlQuery>
namespace Ui {
class registers;
}
class registers : public QMainWindow
{
Q_OBJECT
public:
explicit registers(QWidget *parent = nullptr);
~registers();
protected:
void paintEvent(QPaintEvent*);
private slots:
void on_pushButton_clicked();
private:
bool verify(int x);
void sign_in();
Ui::registers *ui;
QLabel *bg;
QSqlDatabase db;
};
#endif // REGISTERS_H

@ -0,0 +1,277 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>registers</class>
<widget class="QMainWindow" name="registers">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>50</x>
<y>50</y>
<width>700</width>
<height>400</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>确认密码:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>身份证:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>账号(手机号)</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_password_r">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>密码:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit_account">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_name">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>姓名:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="lineEdit_id">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_password">
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>350</x>
<y>525</y>
<width>100</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>14</pointsize>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>注册</string>
</property>
</widget>
<widget class="QFrame" name="frame_2">
<property name="geometry">
<rect>
<x>50</x>
<y>450</y>
<width>700</width>
<height>50</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_5">
<property name="font">
<font>
<family>Microsoft YaHei UI</family>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>性别:</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_M">
<property name="font">
<font>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>男</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_F">
<property name="font">
<font>
<pointsize>12</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>女</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>17</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

@ -1,9 +1,11 @@
<RCC> <RCC>
<qresource prefix="/image/bg"> <qresource prefix="/image/bg">
<file>login.png</file> <file>login.png</file>
<file>register.jpg</file>
</qresource> </qresource>
<qresource prefix="/image/icon"> <qresource prefix="/image/icon">
<file>info.png</file> <file>info.png</file>
<file>logo.png</file> <file>logo.png</file>
<file>return.png</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Loading…
Cancel
Save