加入登录窗口

This commit is contained in:
2020-03-06 11:43:58 +08:00
parent 06f18d2080
commit 2778431121
9 changed files with 714 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
#include "QLoginDialog.h"
QLoginDialog::QLoginDialog( QWidget * parent )
: QDialog( parent )
{
ui.setupUi( this );
init();
}
QLoginDialog::~QLoginDialog()
{
}
void QLoginDialog::init()
{
initData();
initWidgets();
initSignal();
}
void QLoginDialog::initData()
{
}
void QLoginDialog::initSignal()
{
}
void QLoginDialog::initWidgets()
{
setLayout( ui.pLayoutMain );
}

View File

@@ -0,0 +1,22 @@
#pragma once
#include <QDialog>
#include "ui_QLoginDialog.h"
class QLoginDialog : public QDialog
{
Q_OBJECT
public:
QLoginDialog(QWidget *parent = Q_NULLPTR);
~QLoginDialog();
protected Q_SLOTS:
void init();
void initData();
void initSignal();
void initWidgets();
private:
Ui::QLoginDialog ui;
};

View File

@@ -0,0 +1,281 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QLoginDialog</class>
<widget class="QDialog" name="QLoginDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>350</width>
<height>160</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>160</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>350</width>
<height>160</height>
</size>
</property>
<property name="windowTitle">
<string>猜猜你是谁~~~~</string>
</property>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>349</width>
<height>158</height>
</rect>
</property>
<layout class="QVBoxLayout" name="pLayoutMain">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../resource.qrc">:/QMainFrame/Resources/cat.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>人员信息:</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>85</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>85</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>系统用户名:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid silver;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>85</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>85</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>人员名称:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_2">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid silver;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>85</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>85</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>岗位:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit_3">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border: 1px solid silver;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="pButtonExit">
<property name="text">
<string>退出</string>
</property>
<property name="icon">
<iconset>
<normalon>:/QMainFrame/Resources/quit.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="pButtonOK">
<property name="text">
<string>确认</string>
</property>
<property name="icon">
<iconset>
<normalon>:/QMainFrame/Resources/ok.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="../../resource.qrc"/>
</resources>
<connections/>
</ui>