资源简介
:Widget控件轻松实现窗体镶嵌,
代码片段和文件信息
from PyQt5 import QtCore QtGui QtWidgets
class Ui_First(object):
def setupUi(self Ui_First):
Ui_First.setobjectName(“MainWindow“)
# Ui_First.resize(600 600)
# self.centralwidget = QtWidgets.QWidget(Ui_First)
# self.centralwidget.setobjectName(“centralwidget“)
self.horizontalLayout = QtWidgets.QHBoxLayout(Ui_First)
self.horizontalLayout.setobjectName(“horizontalLayout“)
self.frame_2 = QtWidgets.Qframe(Ui_First)
self.frame_2.setstyleSheet(“background-color:white;“)
self.frame_2.setframeShape(QtWidgets.Qframe.styledPanel)
self.frame_2.setframeShadow(QtWidgets.Qframe.Raised)
self.frame_2.setobjectName(“frame_2“)
self.label = QtWidgets.QLabel(self.frame_2)
self.label.setGeometry(QtCore.QRect(300 180 181 81))
font = QtGui.QFont()
font.setPointSize(20)
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setobjectName(“label“)
self.horizontalLayout.addWidget(self.frame_2)
# Ui_First.setCentralWidget(self.centralwidget)
# self.menubar = QtWidgets.QMenuBar(Ui_First)
# self.menubar.setGeometry(QtCore.QRect(0 0 800 23))
# self.menubar.setobjectName(“menubar“)
# Ui_First.setMenuBar(self.menubar)
# self.statusbar = QtWidgets.QStatusBar(Ui_First)
# self.statusbar.setobjectName(“statusbar“)
# Ui_First.setStatusBar(self.statusbar)
self.retranslateUi(Ui_First)
QtCore.Qmetaobject.connectSlotsByName(Ui_First)
def retranslateUi(self MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowtitle(_translate(“MainWindow“ “MainWindow“))
self.label.setText(_translate(“MainWindow“ “我是界面1“))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1872 2020-10-29 17:05 firsta.py
文件 4285 2020-10-29 13:21 index.py
文件 1884 2020-10-28 15:24 second.py
----------- --------- ---------- ----- ----
8041 3
评论
共有 条评论