本文整理汇总了Python中PyQt5.QtWidgets.QFormLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QtWidgets.QFormLayout方法的具体用法?Python QtWidgets.QFormLayout怎么用?Python QtWidgets.QFormLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtWidgets
的用法示例。
在下文中一共展示了QtWidgets.QFormLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createType
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def createType(self, z):
self.Settings = QtWidgets.QGroupBox(globals.trans.string('ZonesDlg', 76))
self.Zone_settings = []
ZoneSettingsLeft = QtWidgets.QFormLayout()
ZoneSettingsRight = QtWidgets.QFormLayout()
settingsNames = globals.trans.stringList('ZonesDlg', 77)
for i in range(0, 8):
self.Zone_settings.append(QtWidgets.QCheckBox())
self.Zone_settings[i].setChecked(z.type & (2 ** i))
if i < 4:
ZoneSettingsLeft.addRow(settingsNames[i], self.Zone_settings[i])
else:
ZoneSettingsRight.addRow(settingsNames[i], self.Zone_settings[i])
ZoneSettingsLayout = QtWidgets.QHBoxLayout()
ZoneSettingsLayout.addLayout(ZoneSettingsLeft)
ZoneSettingsLayout.addStretch()
ZoneSettingsLayout.addLayout(ZoneSettingsRight)
self.Settings.setLayout(ZoneSettingsLayout)
示例2: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, app):
super().__init__(app)
self._widget = QtWidgets.QWidget()
layout = QtWidgets.QFormLayout()
self._widget.setLayout(layout)
layout.addRow(QtWidgets.QLabel("High pass filter analysis"))
layout.addRow(QtWidgets.QLabel(
f"Please place {self.app.markers[0].name} in the filter passband."))
self.result_label = QtWidgets.QLabel()
self.cutoff_label = QtWidgets.QLabel()
self.six_db_label = QtWidgets.QLabel()
self.sixty_db_label = QtWidgets.QLabel()
self.db_per_octave_label = QtWidgets.QLabel()
self.db_per_decade_label = QtWidgets.QLabel()
layout.addRow("Result:", self.result_label)
layout.addRow("Cutoff frequency:", self.cutoff_label)
layout.addRow("-6 dB point:", self.six_db_label)
layout.addRow("-60 dB point:", self.sixty_db_label)
layout.addRow("Roll-off:", self.db_per_octave_label)
layout.addRow("Roll-off:", self.db_per_decade_label)
示例3: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, app):
super().__init__(app)
self._widget = QtWidgets.QWidget()
layout = QtWidgets.QFormLayout()
self._widget.setLayout(layout)
layout.addRow(QtWidgets.QLabel("Low pass filter analysis"))
layout.addRow(
QtWidgets.QLabel(
f"Please place {self.app.markers[0].name}"
f" in the filter passband."))
self.result_label = QtWidgets.QLabel()
self.cutoff_label = QtWidgets.QLabel()
self.six_db_label = QtWidgets.QLabel()
self.sixty_db_label = QtWidgets.QLabel()
self.db_per_octave_label = QtWidgets.QLabel()
self.db_per_decade_label = QtWidgets.QLabel()
layout.addRow("Result:", self.result_label)
layout.addRow("Cutoff frequency:", self.cutoff_label)
layout.addRow("-6 dB point:", self.six_db_label)
layout.addRow("-60 dB point:", self.sixty_db_label)
layout.addRow("Roll-off:", self.db_per_octave_label)
layout.addRow("Roll-off:", self.db_per_decade_label)
示例4: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, app):
super().__init__(app)
self._widget = QtWidgets.QWidget()
self.layout = QtWidgets.QFormLayout()
self._widget.setLayout(self.layout)
self.input_vswr_limit = QtWidgets.QDoubleSpinBox()
self.input_vswr_limit.setValue(self.vswr_limit_value)
self.input_vswr_limit.setSingleStep(0.1)
self.input_vswr_limit.setMinimum(1)
self.input_vswr_limit.setMaximum(25)
self.input_vswr_limit.setDecimals(2)
self.checkbox_move_marker = QtWidgets.QCheckBox()
self.layout.addRow(QtWidgets.QLabel("<b>Settings</b>"))
self.layout.addRow("VSWR limit", self.input_vswr_limit)
self.layout.addRow(VSWRAnalysis.QHLine())
self.results_label = QtWidgets.QLabel("<b>Results</b>")
self.layout.addRow(self.results_label)
示例5: quickLayout
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def quickLayout(self, type, ui_name=""):
the_layout = ''
if type in ("form", "QFormLayout"):
the_layout = QtWidgets.QFormLayout()
the_layout.setLabelAlignment(QtCore.Qt.AlignLeft)
the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
elif type in ("grid", "QGridLayout"):
the_layout = QtWidgets.QGridLayout()
elif type in ("hbox", "QHBoxLayout"):
the_layout = QtWidgets.QHBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
else:
the_layout = QtWidgets.QVBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
if ui_name != "":
self.uiList[ui_name] = the_layout
return the_layout
示例6: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, client, *args, **kwargs):
QWidget.__init__(self, *args, **kwargs)
self.client = client
self.setLayout(QFormLayout())
# Datafile
self.datafilewidg = DatafileWidget()
self.datafilewidg.datafileLoaded.connect(self._load_datafile)
self.layout().addRow(QLabel("Datafile"), self.datafilewidg)
# Listeners
self.listenerwidg = ListenerWidget()
self.listenerwidg.listenersUpdated.connect(self._listeners_updated)
self.layout().addRow(QLabel("Listeners"), self.listenerwidg)
# Proxy settings
self.proxywidg = ProxyInfoWidget()
self.proxywidg.proxyInfoUpdated.connect(self._set_proxy_settings)
self.layout().addRow(QLabel("Proxy Settings"), self.proxywidg)
self.load_config()
示例7: setupUi
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def setupUi(self, NewRepo):
NewRepo.setObjectName("NewRepo")
NewRepo.resize(343, 97)
self.verticalLayout = QtWidgets.QVBoxLayout(NewRepo)
self.verticalLayout.setObjectName("verticalLayout")
self.formLayout = QtWidgets.QFormLayout()
self.formLayout.setContentsMargins(10, 10, 10, 10)
self.formLayout.setObjectName("formLayout")
self.nameLabel = QtWidgets.QLabel(NewRepo)
self.nameLabel.setObjectName("nameLabel")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.nameLabel)
self.nameLineEdit = QtWidgets.QLineEdit(NewRepo)
self.nameLineEdit.setObjectName("nameLineEdit")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.nameLineEdit)
self.verticalLayout.addLayout(self.formLayout)
self.buttonBox = QtWidgets.QDialogButtonBox(NewRepo)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(NewRepo)
self.buttonBox.accepted.connect(NewRepo.accept)
self.buttonBox.rejected.connect(NewRepo.reject)
QtCore.QMetaObject.connectSlotsByName(NewRepo)
示例8: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, parent=None):
super(BaseModelSelectionPage, self).__init__(parent)
self.setTitle("Base Model Selection")
self._layout = QVBoxLayout(self)
_model_section_widget = QWidget()
_section_layout = QFormLayout(_model_section_widget)
self.ds_picker = DatasetPicker()
self.arch_picker = ModelPicker()
self._num_of_epochs_picker = QSpinBox()
self._num_of_workers_picker = QSpinBox()
self._batch_size_picker = QSpinBox()
self._learning_rate_picker = QDoubleSpinBox()
self._learning_momentum_picker = QDoubleSpinBox()
self._learning_weight_decay_picker = QDoubleSpinBox()
self._learning_weight_decay_picker = QDoubleSpinBox()
_section_layout.addRow(self.tr("Dataset: "), self.ds_picker)
_section_layout.addRow(self.tr("Architecture: "), self.arch_picker)
_section_layout.addRow(self.tr("Number of epochs: "), self._num_of_epochs_picker)
_section_layout.addRow(self.tr("Number of workers: "), self._num_of_workers_picker)
_section_layout.addRow(self.tr("Batch Size: "), self._batch_size_picker)
_section_layout.addRow(self.tr("Learning rate: "), self._learning_rate_picker)
self._layout.addWidget(GUIUtilities.wrap_with_groupbox(_model_section_widget, "Model Details"))
示例9: createChartView
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def createChartView(
self, _x2idx: dict, _idx2x: list
) -> QHBoxLayout:
chart = QChart()
# assign y range
self.calcRangeY()
self.setAxisY(self.begin_y, self.end_y)
value_layout = QFormLayout()
# add each series
for v in self.series_table.values():
v.addSeries(_x2idx, _idx2x, chart, self.axis_x, self.axis_y)
if v.show_value:
value_layout.addWidget(v.show_group)
# create chartview and layout for view and value
chartview = ChartView(chart, self.wizard)
chartview.setRenderHint(QPainter.Antialiasing)
global_layout = QHBoxLayout()
global_layout.addWidget(chartview, self.chart_stretch)
global_layout.addLayout(value_layout)
return global_layout
示例10: createShow
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def createShow(self):
self.show_group = QGroupBox()
self.show_group.setTitle(self.name)
self.show_open_edit = QLineEdit()
self.show_open_edit.setDisabled(True)
self.show_high_edit = QLineEdit()
self.show_high_edit.setDisabled(True)
self.show_low_edit = QLineEdit()
self.show_low_edit.setDisabled(True)
self.show_close_edit = QLineEdit()
self.show_close_edit.setDisabled(True)
layout = QFormLayout()
layout.addWidget(QLabel('open'))
layout.addWidget(self.show_open_edit)
layout.addWidget(QLabel('high'))
layout.addWidget(self.show_high_edit)
layout.addWidget(QLabel('low'))
layout.addWidget(self.show_low_edit)
layout.addWidget(QLabel('close'))
layout.addWidget(self.show_close_edit)
self.show_group.setLayout(layout)
示例11: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, settings, parent=None):
super().__init__(parent, modal=True)
self.setLayout(qtw.QFormLayout())
self.settings = settings
self.layout().addRow(
qtw.QLabel('<h1>Application Settings</h1>'),
)
self.show_warnings_cb = qtw.QCheckBox(
#checked=settings.get('show_warnings')
checked=settings.value('show_warnings', type=bool)
)
self.layout().addRow("Show Warnings", self.show_warnings_cb)
self.accept_btn = qtw.QPushButton('Ok', clicked=self.accept)
self.cancel_btn = qtw.QPushButton('Cancel', clicked=self.reject)
self.layout().addRow(self.accept_btn, self.cancel_btn)
示例12: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self, name, author, copyright, links, emails, version, build, update, license, desc, smallIcon,
bigIcon, qss, parent = None):
super(HelpDialog, self).__init__(parent)
self.name = name
self.author = author
self.copyright = copyright
self.links = links
self.emails = emails
self.version = version
self.build = build
self.update = update
self.desc = QtWidgets.QLabel(desc)
self.smallIcon = smallIcon
self.bigIcon = bigIcon
self.qss = qss
self.setWindowTitle("About {0}".format(self.name))
self.Main = QtWidgets.QVBoxLayout()
self.frm = QtWidgets.QFormLayout()
self.setGeometry(0, 0, 350, 400)
self.center()
self.Qui_update()
self.setStyleSheet(self.qss)
示例13: __init__
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def __init__(self):
"""
Creates and initializes the dialog
"""
super().__init__()
self.setWindowTitle(globals.trans.string('ShftItmDlg', 0))
self.setWindowIcon(GetIcon('move'))
self.XOffset = QtWidgets.QSpinBox()
self.XOffset.setRange(-16384, 16383)
self.YOffset = QtWidgets.QSpinBox()
self.YOffset.setRange(-8192, 8191)
buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
moveLayout = QtWidgets.QFormLayout()
offsetlabel = QtWidgets.QLabel(globals.trans.string('ShftItmDlg', 2))
offsetlabel.setWordWrap(True)
moveLayout.addWidget(offsetlabel)
moveLayout.addRow(globals.trans.string('ShftItmDlg', 3), self.XOffset)
moveLayout.addRow(globals.trans.string('ShftItmDlg', 4), self.YOffset)
moveGroupBox = QtWidgets.QGroupBox(globals.trans.string('ShftItmDlg', 1))
moveGroupBox.setLayout(moveLayout)
mainLayout = QtWidgets.QVBoxLayout()
mainLayout.addWidget(moveGroupBox)
mainLayout.addWidget(buttonBox)
self.setLayout(mainLayout)
示例14: createBounds
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def createBounds(self, z):
self.Bounds = QtWidgets.QGroupBox(globals.trans.string('ZonesDlg', 47))
self.Zone_yboundup = QtWidgets.QSpinBox()
self.Zone_yboundup.setRange(-32766, 32767)
self.Zone_yboundup.setToolTip(globals.trans.string('ZonesDlg', 49))
self.Zone_yboundup.setSpecialValueText('32')
self.Zone_yboundup.setValue(z.yupperbound)
self.Zone_ybounddown = QtWidgets.QSpinBox()
self.Zone_ybounddown.setRange(-32766, 32767)
self.Zone_ybounddown.setToolTip(globals.trans.string('ZonesDlg', 51))
self.Zone_ybounddown.setValue(z.ylowerbound)
self.Zone_yboundup2 = QtWidgets.QSpinBox()
self.Zone_yboundup2.setRange(-32766, 32767)
self.Zone_yboundup2.setToolTip(globals.trans.string('ZonesDlg', 71))
self.Zone_yboundup2.setValue(z.yupperbound2)
self.Zone_ybounddown2 = QtWidgets.QSpinBox()
self.Zone_ybounddown2.setRange(-32766, 32767)
self.Zone_ybounddown2.setToolTip(globals.trans.string('ZonesDlg', 73))
self.Zone_ybounddown2.setValue(z.ylowerbound2)
self.Zone_boundflg = QtWidgets.QCheckBox()
self.Zone_boundflg.setToolTip(globals.trans.string('ZonesDlg', 75))
self.Zone_boundflg.setChecked(z.unknownbnf == 0xF)
LA = QtWidgets.QFormLayout()
LA.addRow(globals.trans.string('ZonesDlg', 48), self.Zone_yboundup)
LA.addRow(globals.trans.string('ZonesDlg', 50), self.Zone_ybounddown)
LA.addRow(globals.trans.string('ZonesDlg', 74), self.Zone_boundflg)
LB = QtWidgets.QFormLayout()
LB.addRow(globals.trans.string('ZonesDlg', 70), self.Zone_yboundup2)
LB.addRow(globals.trans.string('ZonesDlg', 72), self.Zone_ybounddown2)
LC = QtWidgets.QGridLayout()
LC.addLayout(LA, 0, 0)
LC.addLayout(LB, 0, 1)
self.Bounds.setLayout(LC)
示例15: createAudio
# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QFormLayout [as 别名]
def createAudio(self, z):
self.Audio = QtWidgets.QGroupBox(globals.trans.string('ZonesDlg', 52))
self.AutoEditMusic = False
self.Zone_music = QtWidgets.QComboBox()
self.Zone_music.setToolTip(globals.trans.string('ZonesDlg', 54))
import gamedefs
newItems = gamedefs.getMusic()
del gamedefs
for a, b in newItems:
self.Zone_music.addItem(b, a) # text, songid
self.Zone_music.setCurrentIndex(self.Zone_music.findData(z.music))
self.Zone_music.currentIndexChanged.connect(self.handleMusicListSelect)
self.Zone_musicid = QtWidgets.QSpinBox()
self.Zone_musicid.setToolTip(globals.trans.string('ZonesDlg', 69))
self.Zone_musicid.setMaximum(255)
self.Zone_musicid.setValue(z.music)
self.Zone_musicid.valueChanged.connect(self.handleMusicIDChange)
self.Zone_sfx = QtWidgets.QComboBox()
self.Zone_sfx.setToolTip(globals.trans.string('ZonesDlg', 56))
newItems3 = globals.trans.stringList('ZonesDlg', 57)
self.Zone_sfx.addItems(newItems3)
self.Zone_sfx.setCurrentIndex(z.sfxmod / 16)
self.Zone_boss = QtWidgets.QCheckBox()
self.Zone_boss.setToolTip(globals.trans.string('ZonesDlg', 59))
self.Zone_boss.setChecked(z.sfxmod % 16)
ZoneAudioLayout = QtWidgets.QFormLayout()
ZoneAudioLayout.addRow(globals.trans.string('ZonesDlg', 53), self.Zone_music)
ZoneAudioLayout.addRow(globals.trans.string('ZonesDlg', 68), self.Zone_musicid)
ZoneAudioLayout.addRow(globals.trans.string('ZonesDlg', 55), self.Zone_sfx)
ZoneAudioLayout.addRow(globals.trans.string('ZonesDlg', 58), self.Zone_boss)
self.Audio.setLayout(ZoneAudioLayout)