QT登录注册界面

13 篇文章 0 订阅

QSS简单写的登录注册页面,方便后面直接复制使用
在这里插入图片描述

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>Regina</class>
 <widget class="QDialog" name="Regina">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>600</width>
    <height>450</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>登录</string>
  </property>
  <layout class="QHBoxLayout" name="horizontalLayout">
   <property name="spacing">
    <number>0</number>
   </property>
   <property name="leftMargin">
    <number>0</number>
   </property>
   <property name="topMargin">
    <number>0</number>
   </property>
   <property name="rightMargin">
    <number>0</number>
   </property>
   <property name="bottomMargin">
    <number>0</number>
   </property>
   <item>
    <widget class="QStackedWidget" name="stackedWidget">
     <property name="styleSheet">
      <string notr="true"/>
     </property>
     <property name="currentIndex">
      <number>0</number>
     </property>
     <widget class="QWidget" name="page">
      <property name="styleSheet">
       <string notr="true">#page{
	background-color: rgb(255, 255, 255);
}</string>
      </property>
      <widget class="QLabel" name="label">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>601</width>
         <height>181</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">background-color: rgb(162,102,254);</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QLabel" name="label_2">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>131</width>
         <height>81</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">color: rgb(255, 255, 255);
font: 24pt &quot;华文行楷&quot;;</string>
       </property>
       <property name="text">
        <string>登录</string>
       </property>
       <property name="alignment">
        <set>Qt::AlignCenter</set>
       </property>
      </widget>
      <widget class="QLabel" name="label_3">
       <property name="geometry">
        <rect>
         <x>260</x>
         <y>140</y>
         <width>80</width>
         <height>80</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">background-color: rgb(254,249,225);
border-radius: 40px;</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QPushButton" name="btnToRegister">
       <property name="geometry">
        <rect>
         <x>10</x>
         <y>410</y>
         <width>71</width>
         <height>28</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QPushButton{
	border: none;
	color: rgb(166,166,166);
}
QPushButton:hover{
	color: rgb(131,131,131);
}
</string>
       </property>
       <property name="text">
        <string>注册账号</string>
       </property>
      </widget>
      <widget class="QPushButton" name="btnLogin">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>370</y>
         <width>300</width>
         <height>45</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QPushButton{
	border-radius: 5px;
	border: none;
	background-color: rgb(30,199,253);
	color: rgb(255, 255, 255);
	font: 16pt &quot;楷体&quot;;
}
QPushButton:hover{
	background-color: rgb(122,226,255);
}</string>
       </property>
       <property name="text">
        <string>登录</string>
       </property>
      </widget>
      <widget class="QLineEdit" name="txtIdL">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>240</y>
         <width>300</width>
         <height>50</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QLineEdit{
	border: none;
	background-color: rgba(255, 255, 255, 0);
	border-bottom: 1px solid rgb(229,229,229);
	font: 14pt &quot;黑体&quot;;
	color: rgb(193,193,193);
}
QLineEdit:focus{
	border-bottom: 1px solid rgb(193,193,193);
	color: rgb(33,33,33);
}</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QLineEdit" name="txtPwdL">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>300</y>
         <width>300</width>
         <height>50</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QLineEdit{
	border: none;
	background-color: rgba(255, 255, 255, 0);
	border-bottom: 1px solid rgb(229,229,229);
	font: 14pt &quot;黑体&quot;;
	color: rgb(193,193,193);
}
QLineEdit:focus{
	border-bottom: 1px solid rgb(193,193,193);
	color: rgb(33,33,33);
}</string>
       </property>
      </widget>
     </widget>
     <widget class="QWidget" name="page_2">
      <property name="styleSheet">
       <string notr="true">#page_2{
	background-color: rgb(255, 255, 255);
}</string>
      </property>
      <widget class="QLabel" name="label_4">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>131</width>
         <height>81</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">color: rgb(255, 255, 255);
font: 24pt &quot;华文行楷&quot;;</string>
       </property>
       <property name="text">
        <string>注册</string>
       </property>
       <property name="alignment">
        <set>Qt::AlignCenter</set>
       </property>
      </widget>
      <widget class="QLineEdit" name="txtIdR">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>240</y>
         <width>300</width>
         <height>50</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QLineEdit{
	border: none;
	background-color: rgba(255, 255, 255, 0);
	border-bottom: 1px solid rgb(229,229,229);
	font: 14pt &quot;黑体&quot;;
	color: rgb(77, 77, 77);
}
QLineEdit:focus{
	border-bottom: 1px solid rgb(193,193,193);
	color: rgb(33,33,33);
}</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QLabel" name="label_5">
       <property name="geometry">
        <rect>
         <x>260</x>
         <y>140</y>
         <width>80</width>
         <height>80</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">background-color: rgb(155,208,248);
border-radius: 40px;</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QLineEdit" name="txtPwdR">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>300</y>
         <width>300</width>
         <height>50</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QLineEdit{
	border: none;
	background-color: rgba(255, 255, 255, 0);
	border-bottom: 1px solid rgb(229,229,229);
	font: 14pt &quot;黑体&quot;;
	color: rgb(193,193,193);
}
QLineEdit:focus{
	border-bottom: 1px solid rgb(193,193,193);
	color: rgb(33,33,33);
}</string>
       </property>
      </widget>
      <widget class="QPushButton" name="btnRegister">
       <property name="geometry">
        <rect>
         <x>150</x>
         <y>370</y>
         <width>300</width>
         <height>45</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QPushButton{
	border-radius: 5px;
	border: none;
	background-color: rgb(30,199,253);
	color: rgb(255, 255, 255);
	font: 16pt &quot;楷体&quot;;
}
QPushButton:hover{
	background-color: rgb(122,226,255);
}</string>
       </property>
       <property name="text">
        <string>注册</string>
       </property>
      </widget>
      <widget class="QLabel" name="label_6">
       <property name="geometry">
        <rect>
         <x>0</x>
         <y>0</y>
         <width>601</width>
         <height>181</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">background-color: rgb(162,102,254);</string>
       </property>
       <property name="text">
        <string/>
       </property>
      </widget>
      <widget class="QPushButton" name="btnToLogin">
       <property name="geometry">
        <rect>
         <x>10</x>
         <y>410</y>
         <width>71</width>
         <height>28</height>
        </rect>
       </property>
       <property name="styleSheet">
        <string notr="true">QPushButton{
	border: none;
	color: rgb(166,166,166);
}
QPushButton:hover{
	color: rgb(131,131,131);
}
</string>
       </property>
       <property name="text">
        <string>继续登录</string>
       </property>
      </widget>
      <zorder>txtIdR</zorder>
      <zorder>txtPwdR</zorder>
      <zorder>btnRegister</zorder>
      <zorder>label_6</zorder>
      <zorder>label_4</zorder>
      <zorder>label_5</zorder>
      <zorder>btnToLogin</zorder>
     </widget>
    </widget>
   </item>
  </layout>
 </widget>
 <resources/>
 <connections/>
</ui>

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

向娇葵

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值