当前位置: 首页>>代码示例>>Python>>正文


Python QFormLayout.addWidget方法代码示例

本文整理汇总了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)
开发者ID:michaelballantyne,项目名称:py-ws-client,代码行数:38,代码来源:pywscclient.py

示例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
开发者ID:mmcauliffe,项目名称:exemplar-network-explorer,代码行数:63,代码来源:config.py


注:本文中的PySide.QtGui.QFormLayout.addWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。