本文整理汇总了Python中AnyQt.QtWidgets.QFormLayout.setLabelAlignment方法的典型用法代码示例。如果您正苦于以下问题:Python QFormLayout.setLabelAlignment方法的具体用法?Python QFormLayout.setLabelAlignment怎么用?Python QFormLayout.setLabelAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnyQt.QtWidgets.QFormLayout
的用法示例。
在下文中一共展示了QFormLayout.setLabelAlignment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_main_layout
# 需要导入模块: from AnyQt.QtWidgets import QFormLayout [as 别名]
# 或者: from AnyQt.QtWidgets.QFormLayout import setLabelAlignment [as 别名]
def add_main_layout(self):
form = QFormLayout()
form.setFieldGrowthPolicy(form.AllNonFixedFieldsGrow)
form.setVerticalSpacing(25)
form.setLabelAlignment(Qt.AlignLeft)
gui.widgetBox(self.controlArea, True, orientation=form)
form.addRow(
"Neurons in hidden layers:",
gui.lineEdit(
None, self, "hidden_layers_input",
orientation=Qt.Horizontal, callback=self.settings_changed,
tooltip="A list of integers defining neurons. Length of list "
"defines the number of layers. E.g. 4, 2, 2, 3.",
placeholderText="e.g. 10,"))
form.addRow(
"Activation:",
gui.comboBox(
None, self, "activation_index", orientation=Qt.Horizontal,
label="Activation:", items=[i for i in self.act_lbl],
callback=self.settings_changed))
form.addRow(" ", gui.separator(None, 16))
form.addRow(
"Solver:",
gui.comboBox(
None, self, "solver_index", orientation=Qt.Horizontal,
label="Solver:", items=[i for i in self.solv_lbl],
callback=self.settings_changed))
self.reg_label = QLabel()
slider = gui.hSlider(
None, self, "alpha_index",
minValue=0, maxValue=len(self.alphas) - 1,
callback=lambda: (self.set_alpha(), self.settings_changed()),
createLabel=False)
form.addRow(self.reg_label, slider)
self.set_alpha()
form.addRow(
"Maximal number of iterations:",
gui.spin(
None, self, "max_iterations", 10, 10000, step=10,
label="Max iterations:", orientation=Qt.Horizontal,
alignment=Qt.AlignRight, callback=self.settings_changed))
form.addRow(gui.separator(None))
form.addRow(
gui.checkBox(
None, self, "replicable", label="Replicable training", callback=self.settings_changed),
)