推荐门户网站建设公司2个女人做暧暧网站
news/
2025/9/23 11:14:29/
文章来源:
推荐门户网站建设公司,2个女人做暧暧网站,黄石做网站多少钱,蓝色企业网站模板目录
一、效果图
二、qtDesigner
①拖出一个frame作为组容器并贴上背景样式
②拖出主要的三个控件#xff1a;frame、line、frame、label*2
③固定大小并设置字体、布局一下 ④拷贝三份并水平布局一下
⑤设置样式
⑥调整布局
三、ui文件
四、代码 一、效果图 二、qtD…目录
一、效果图
二、qtDesigner
①拖出一个frame作为组容器并贴上背景样式
②拖出主要的三个控件frame、line、frame、label*2
③固定大小并设置字体、布局一下 ④拷贝三份并水平布局一下
⑤设置样式
⑥调整布局
三、ui文件
四、代码 一、效果图 二、qtDesigner
①拖出一个frame作为组容器并贴上背景样式 # 整体样式
QFrame#frame{
background-color: rgb(238, 242, 255);
border:2px solid rgb(255, 255, 255);
border-radius:15px;
}
②拖出主要的三个控件frame、line、frame、label*2 ③固定大小并设置字体、布局一下 # 标题字体
color: rgba(255, 255, 255,210);
padding-left:12px;
font: 700 italic 16pt Segoe UI;# 内容字体
color: rgb(255, 255, 255);
font: 17pt Microsoft YaHei UI;④拷贝三份并水平布局一下 ⑤设置样式 # 标题一样式
QFrame#frame_2{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(162, 129, 247), stop:1 rgb(119, 111, 252));
border: 1px outset rgb(98, 91, 213);
}# 标题二样式
QFrame#frame_5{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(253, 139, 133), stop:1 rgb(248, 194, 152));
border: 1px outset rgb(252, 194, 149)
}# 标题三样式
QFrame#frame_16{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(243, 175, 189), stop:1 rgb(155, 118, 218));
border: 1px outset rgb(153, 117, 219)
}# 标题四样式
QFrame#frame_19{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(66, 226, 192), stop:1 rgb(62, 154, 193));
border: 1px outset rgb(72, 158, 204)
}⑥调整布局 三、ui文件
?xml version1.0 encodingUTF-8?
ui version4.0classForm/classwidget classQWidget nameFormproperty namegeometryrectx0/xy0/ywidth750/widthheight295/height/rect/propertyproperty namewindowTitlestringForm/string/propertylayout classQHBoxLayout namehorizontalLayout_2itemwidget classQFrame nameframeproperty namestyleSheetstring notrtrueQFrame#frame{
background-color: rgb(238, 242, 255);
border:2px solid rgb(255, 255, 255);
border-radius:15px;
}/string/propertyproperty nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayoutitemwidget classQFrame nameframe_2property nameminimumSizesizewidth160/widthheight110/height/size/propertyproperty namemaximumSizesizewidth160/widthheight110/height/size/propertyproperty namestyleSheetstring notrtrueQFrame#frame_2{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(162, 129, 247), stop:1 rgb(119, 111, 252));
border: 1px outset rgb(98, 91, 213);
}/string/propertyproperty nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQVBoxLayout nameverticalLayoutitemwidget classQFrame nameframe_3property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_7itemwidget classQLabel namelabelproperty namestyleSheetstring notrtruecolor: rgba(255, 255, 255,210);
padding-left:12px;
font: 700 italic 16pt quot;Segoe UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/itemitemwidget classLine namelineproperty nameorientationenumQt::Horizontal/enum/property/widget/itemitemwidget classQFrame nameframe_4property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_8itemwidget classQLabel namelabel_2property namestyleSheetstring notrtruecolor: rgb(255, 255, 255);
font: 17pt quot;Microsoft YaHei UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/item/layout/widget/itemitemwidget classQFrame nameframe_5property nameminimumSizesizewidth160/widthheight110/height/size/propertyproperty namemaximumSizesizewidth160/widthheight110/height/size/propertyproperty namestyleSheetstring notrtrueQFrame#frame_5{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(253, 139, 133), stop:1 rgb(248, 194, 152));
border: 1px outset rgb(252, 194, 149)
}/string/propertyproperty nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQVBoxLayout nameverticalLayout_6itemwidget classQFrame nameframe_10property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_9itemwidget classQLabel namelabel_11property namestyleSheetstring notrtruecolor: rgba(255, 255, 255,210);
padding-left:12px;
font: 700 italic 16pt quot;Segoe UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/itemitemwidget classLine nameline_6property nameorientationenumQt::Horizontal/enum/property/widget/itemitemwidget classQFrame nameframe_13property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_10itemwidget classQLabel namelabel_12property namestyleSheetstring notrtruecolor: rgb(255, 255, 255);
font: 17pt quot;Microsoft YaHei UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/item/layout/widget/itemitemwidget classQFrame nameframe_16property nameminimumSizesizewidth160/widthheight110/height/size/propertyproperty namemaximumSizesizewidth160/widthheight110/height/size/propertyproperty namestyleSheetstring notrtrueQFrame#frame_16{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(243, 175, 189), stop:1 rgb(155, 118, 218));
border: 1px outset rgb(153, 117, 219)
}/string/propertyproperty nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQVBoxLayout nameverticalLayout_7itemwidget classQFrame nameframe_17property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_3itemwidget classQLabel namelabel_13property namestyleSheetstring notrtruecolor: rgba(255, 255, 255,210);
padding-left:12px;
font: 700 italic 16pt quot;Segoe UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/itemitemwidget classLine nameline_7property nameorientationenumQt::Horizontal/enum/property/widget/itemitemwidget classQFrame nameframe_18property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_4itemwidget classQLabel namelabel_14property namestyleSheetstring notrtruecolor: rgb(255, 255, 255);
font: 17pt quot;Microsoft YaHei UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/item/layout/widget/itemitemwidget classQFrame nameframe_19property nameminimumSizesizewidth160/widthheight110/height/size/propertyproperty namemaximumSizesizewidth160/widthheight110/height/size/propertyproperty namestyleSheetstring notrtrueQFrame#frame_19{
color: rgb(255, 255, 255);
border-radius: 15px;
background-color: qradialgradient(cx:0, cy:0, radius:1, fx:0.1, fy:0.1, stop:0 rgb(66, 226, 192), stop:1 rgb(62, 154, 193));
border: 1px outset rgb(72, 158, 204)
}
/string/propertyproperty nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQVBoxLayout nameverticalLayout_8itemwidget classQFrame nameframe_20property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_5itemwidget classQLabel namelabel_15property namestyleSheetstring notrtruecolor: rgba(255, 255, 255,210);
padding-left:12px;
font: 700 italic 16pt quot;Segoe UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/itemitemwidget classLine nameline_8property nameorientationenumQt::Horizontal/enum/property/widget/itemitemwidget classQFrame nameframe_21property nameframeShapeenumQFrame::StyledPanel/enum/propertyproperty nameframeShadowenumQFrame::Raised/enum/propertylayout classQHBoxLayout namehorizontalLayout_6itemwidget classQLabel namelabel_16property namestyleSheetstring notrtruecolor: rgb(255, 255, 255);
font: 17pt quot;Microsoft YaHei UIquot;;
/string/propertyproperty nametextstringTextLabel/string/property/widget/item/layout/widget/item/layout/widget/item/layout/widget/item/layout/widgetresources/connections/
/ui四、代码
使用uic工具将ui文件转成py文件
import sysfrom PySide6.QtGui import QColor
from PySide6.QtWidgets import *from zzz.ui_home_3 import Ui_Form# 继承UI类
class MainWindow(QWidget, Ui_Form):def __init__(self, parentNone):super(MainWindow, self).__init__(parent)self.setupUi(self)self.shadow_style(self.frame_2, QColor(162, 129, 247))self.shadow_style(self.frame_5, QColor(251, 157, 139))self.shadow_style(self.frame_16, QColor(170, 128, 213))self.shadow_style(self.frame_19, QColor(64, 186, 193))# 添加阴影def shadow_style(self, widget, Color):shadow QGraphicsDropShadowEffect(self)shadow.setOffset(8, 8) # offsetshadow.setBlurRadius(38) # shadow radiusshadow.setColor(Color) # shadow colorwidget.setGraphicsEffect(shadow)if __name__ __main__:app QApplication(sys.argv)window MainWindow()window.show()sys.exit(app.exec())
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/912335.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!