本文整理汇总了Python中PyQt5.QtWidgets.QTextBrowser.setGeometry方法的典型用法代码示例。如果您正苦于以下问题:Python QTextBrowser.setGeometry方法的具体用法?Python QTextBrowser.setGeometry怎么用?Python QTextBrowser.setGeometry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets.QTextBrowser
的用法示例。
在下文中一共展示了QTextBrowser.setGeometry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: About_Dialog
# 需要导入模块: from PyQt5.QtWidgets import QTextBrowser [as 别名]
# 或者: from PyQt5.QtWidgets.QTextBrowser import setGeometry [as 别名]
class About_Dialog(QDialog):
def __init__(self):
super(About_Dialog, self).__init__()
self.setupUi()
def setupUi(self):
self.setObjectName("Dialog")
self.setFixedSize(464, 257)
icon = QIcon()
icon.addPixmap(QPixmap("./resource/weather-thunder.png"), QIcon.Normal, QIcon.Off)
self.setWindowIcon(icon)
self.setSizeGripEnabled(False)
self.setModal(True)
self.textBrowser = QTextBrowser(self)
self.textBrowser.setGeometry(QRect(0, 130, 491, 192))
self.textBrowser.setObjectName("textBrowser")
self.label = QLabel(self)
self.label.setGeometry(QRect(0, 0, 641, 131))
self.label.setText("")
self.label.setPixmap(QPixmap("./resource/about.jpg"))
self.label.setScaledContents(True)
self.label.setObjectName("label")
self.retranslateUi()
QMetaObject.connectSlotsByName(self)
self.show()
def retranslateUi(self):
_translate = QCoreApplication.translate
self.setWindowTitle(_translate("Dialog", "关于"))
self.textBrowser.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:11pt; font-weight:600;\">绍兴防雷中心 雷电公报制图-v1.0</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt; font-weight:600;\"><br /></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">联系:[email protected]</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;\"><br /></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">©绍兴防雷中心 All rights reserved</span></p></body></html>"))
示例2: Ui_Dialog
# 需要导入模块: from PyQt5.QtWidgets import QTextBrowser [as 别名]
# 或者: from PyQt5.QtWidgets.QTextBrowser import setGeometry [as 别名]
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
Dialog.resize(430, 486)
icon = QIcon()
icon.addPixmap(QPixmap(_fromUtf8("images/icon.ico")), QIcon.Normal, QIcon.Off)
Dialog.setWindowIcon(icon)
self.formLayoutWidget_2 = QWidget(Dialog)
self.formLayoutWidget_2.setGeometry(QRect(230, 80, 181, 131))
self.formLayoutWidget_2.setObjectName(_fromUtf8("formLayoutWidget_2"))
self.formLayout_2 = QFormLayout(self.formLayoutWidget_2)
self.formLayout_2.setFieldGrowthPolicy(QFormLayout.AllNonFixedFieldsGrow)
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
self.label_5 = QLabel(self.formLayoutWidget_2)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.formLayout_2.setWidget(0, QFormLayout.LabelRole, self.label_5)
self.ball_box = QComboBox(self.formLayoutWidget_2)
self.ball_box.setObjectName(_fromUtf8("ball_box"))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.ball_box.addItem(_fromUtf8(""))
self.formLayout_2.setWidget(0, QFormLayout.FieldRole, self.ball_box)
self.label_6 = QLabel(self.formLayoutWidget_2)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.formLayout_2.setWidget(2, QFormLayout.LabelRole, self.label_6)
self.status_box = QComboBox(self.formLayoutWidget_2)
self.status_box.setObjectName(_fromUtf8("status_box"))
self.status_box.addItem(_fromUtf8(""))
self.status_box.addItem(_fromUtf8(""))
self.status_box.addItem(_fromUtf8(""))
self.status_box.addItem(_fromUtf8(""))
self.status_box.addItem(_fromUtf8(""))
self.status_box.addItem(_fromUtf8(""))
self.formLayout_2.setWidget(2, QFormLayout.FieldRole, self.status_box)
spacerItem = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.formLayout_2.setItem(1, QFormLayout.FieldRole, spacerItem)
spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.formLayout_2.setItem(3, QFormLayout.FieldRole, spacerItem1)
self.captured_edit = QLineEdit(self.formLayoutWidget_2)
self.captured_edit.setObjectName(_fromUtf8("captured_edit"))
self.formLayout_2.setWidget(4, QFormLayout.FieldRole, self.captured_edit)
self.label = QLabel(self.formLayoutWidget_2)
self.label.setObjectName(_fromUtf8("label"))
self.formLayout_2.setWidget(4, QFormLayout.LabelRole, self.label)
self.formLayoutWidget_3 = QWidget(Dialog)
self.formLayoutWidget_3.setGeometry(QRect(20, 80, 171, 131))
self.formLayoutWidget_3.setObjectName(_fromUtf8("formLayoutWidget_3"))
self.formLayout_3 = QFormLayout(self.formLayoutWidget_3)
self.formLayout_3.setFieldGrowthPolicy(QFormLayout.AllNonFixedFieldsGrow)
self.formLayout_3.setObjectName(_fromUtf8("formLayout_3"))
self.label_8 = QLabel(self.formLayoutWidget_3)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.formLayout_3.setWidget(0, QFormLayout.LabelRole, self.label_8)
self.pokemon_Name_box = QComboBox(self.formLayoutWidget_3)
self.pokemon_Name_box.setObjectName(_fromUtf8("pokemon_Name_box"))
self.formLayout_3.setWidget(0, QFormLayout.FieldRole, self.pokemon_Name_box)
spacerItem2 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self.formLayout_3.setItem(1, QFormLayout.FieldRole, spacerItem2)
self.label_9 = QLabel(self.formLayoutWidget_3)
self.label_9.setObjectName(_fromUtf8("label_9"))
self.formLayout_3.setWidget(2, QFormLayout.LabelRole, self.label_9)
self.level_edit = QLineEdit(self.formLayoutWidget_3)
self.level_edit.setObjectName(_fromUtf8("level_edit"))
self.formLayout_3.setWidget(2, QFormLayout.FieldRole, self.level_edit)
self.label_10 = QLabel(self.formLayoutWidget_3)
self.label_10.setObjectName(_fromUtf8("label_10"))
self.formLayout_3.setWidget(3, QFormLayout.LabelRole, self.label_10)
self.hp_edit = QLineEdit(self.formLayoutWidget_3)
self.hp_edit.setObjectName(_fromUtf8("hp_edit"))
self.formLayout_3.setWidget(3, QFormLayout.FieldRole, self.hp_edit)
self.spriteLabel = QLabel(self.formLayoutWidget_3)
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.spriteLabel.sizePolicy().hasHeightForWidth())
self.spriteLabel.setSizePolicy(sizePolicy)
self.spriteLabel.setText(_fromUtf8(""))
self.spriteLabel.setObjectName(_fromUtf8("spriteLabel"))
self.formLayout_3.setWidget(1, QFormLayout.LabelRole, self.spriteLabel)
self.textBrowser = QTextBrowser(Dialog)
self.textBrowser.setGeometry(QRect(20, 260, 391, 192))
self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
self.label_3 = QLabel(Dialog)
self.label_3.setGeometry(QRect(335, 460, 71, 20))
self.label_3.setObjectName(_fromUtf8("label_3"))
self.label_4 = QLabel(Dialog)
self.label_4.setGeometry(QRect(20, 30, 251, 16))
font = QFont()
font.setPointSize(10)
font.setBold(True)
font.setWeight(75)
self.label_4.setFont(font)
self.label_4.setObjectName(_fromUtf8("label_4"))
#.........这里部分代码省略.........