本文整理汇总了Python中PySide.QtGui.QFormLayout.addWidget方法的典型用法代码示例。如果您正苦于以下问题:Python QFormLayout.addWidget方法的具体用法?Python QFormLayout.addWidget怎么用?Python QFormLayout.addWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui.QFormLayout
的用法示例。
在下文中一共展示了QFormLayout.addWidget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide.QtGui import QFormLayout [as 别名]
# 或者: from PySide.QtGui.QFormLayout import addWidget [as 别名]
def __init__(self, client, method):
super(Tab, self).__init__(None)
self.client = client
self.method = method
horiz = QHBoxLayout(self)
left = QWidget()
horiz.addWidget(left)
layout = QFormLayout(left)
self.fields = []
for param in method[1]:
field = QLineEdit()
self.fields.append(field)
layout.addRow(param[0], field)
button = QPushButton("Execute Web Service")
button.clicked.connect(self.execute)
layout.addWidget(button)
display = QTabWidget()
self.result = QTextBrowser()
display.addTab(self.result, "Result")
self.request = QTextBrowser()
display.addTab(self.request, "Request", )
self.response = QTextBrowser()
display.addTab(self.response, "Response")
horiz.addWidget(display)
示例2: __init__
# 需要导入模块: from PySide.QtGui import QFormLayout [as 别名]
# 或者: from PySide.QtGui.QFormLayout import addWidget [as 别名]
def __init__(self, setting_dict):
BasePane.__init__( self )
specLayout = QFormLayout()
analysisLayout = QFormLayout()
self.winLenEdit = QLineEdit()
analysisLayout.addRow(QLabel('Window length:'),self.winLenEdit)
self.methodCombo = QComboBox()
self.methodCombo.addItem("Fourier")
analysisLayout.addRow(QLabel('Method:'),self.methodCombo)
self.winTypeCombo = QComboBox()
self.winTypeCombo.addItem("Square (rectangular)")
self.winTypeCombo.addItem("Hamming (raised sine-squared)")
self.winTypeCombo.addItem("Bartlett (triangular)")
self.winTypeCombo.addItem("Welch (parabolic)")
self.winTypeCombo.addItem("Hanning (sine-squared)")
self.winTypeCombo.addItem("Gaussian")
analysisLayout.addRow(QLabel('Window type:'),self.winTypeCombo)
analysisWidget = QGroupBox('Analysis')
analysisWidget.setLayout(analysisLayout)
specLayout.addWidget(analysisWidget)
resLayout = QFormLayout()
self.freqStepsEdit = QLineEdit()
resLayout.addRow(QLabel('Number of frequency steps:'),self.freqStepsEdit)
self.timeStepsEdit = QLineEdit()
resLayout.addRow(QLabel('Number of time steps:'),self.timeStepsEdit)
resWidget = QGroupBox('Frequency and time resolution')
resWidget.setLayout(resLayout)
specLayout.addWidget(resWidget)
viewLayout = QFormLayout()
self.autoScaleCheck = QCheckBox()
viewLayout.addRow(QLabel('Autoscale:'),self.autoScaleCheck)
self.dynamicRangeEdit = QLineEdit()
viewLayout.addRow(QLabel('Dynamic range (dB):'),self.dynamicRangeEdit)
self.maxEdit = QLineEdit()
viewLayout.addRow(QLabel('Maximum (dB/Hz):'),self.maxEdit)
self.preEmphAlphaEdit = QLineEdit()
viewLayout.addRow(QLabel('Pre-emphasis alpha:'),self.preEmphAlphaEdit)
viewWidget = QGroupBox('View settings')
viewWidget.setLayout(viewLayout)
specLayout.addWidget(viewWidget)
self.prev_state = setting_dict