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


Python QDoubleSpinBox.setObjectName方法代码示例

本文整理汇总了Python中PyQt4.QtGui.QDoubleSpinBox.setObjectName方法的典型用法代码示例。如果您正苦于以下问题:Python QDoubleSpinBox.setObjectName方法的具体用法?Python QDoubleSpinBox.setObjectName怎么用?Python QDoubleSpinBox.setObjectName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt4.QtGui.QDoubleSpinBox的用法示例。


在下文中一共展示了QDoubleSpinBox.setObjectName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: createEditor

# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setObjectName [as 别名]
    def createEditor(self, parent, option, index):
        """
        Creates the combobox inside a parent.
        :param parent: The container of the combobox
        :type parent: QWidget
        :param option: QStyleOptionViewItem class is used to describe the
        parameters used to draw an item in a view widget.
        :type option: Object
        :param index: The index where the combobox
         will be added.
        :type index: QModelIndex
        :return: The combobox
        :rtype: QComboBox
        """

        if index.column() == 0:
            str_combo = QComboBox(parent)
            str_combo.setObjectName(unicode(index.row()))
            return str_combo
        elif index.column() == 1:

            spinbox = QDoubleSpinBox(parent)
            spinbox.setObjectName(unicode(index.row()))
            spinbox.setMinimum(0.00)
            spinbox.setSuffix('%')
            spinbox.setMaximum(100.00)
            return spinbox
开发者ID:gltn,项目名称:stdm,代码行数:29,代码来源:str_helpers.py

示例2: create_double_spinbox

# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setObjectName [as 别名]
    def create_double_spinbox(self, parent, index):
        """
        Creates double spinbox.
        :param parent: The parent widget.
        :type parent: QWidget
        :param index: The index.
        :type index: QModelIndex
        :return: The double spinbox
        :rtype: QDoubleSpinBox
        """
        spinbox = QDoubleSpinBox(parent)
        spinbox.setObjectName(unicode(index.row()))

        return spinbox
开发者ID:gltn,项目名称:stdm,代码行数:16,代码来源:generic_delegate.py

示例3: spinBoxFromHabName

# 需要导入模块: from PyQt4.QtGui import QDoubleSpinBox [as 别名]
# 或者: from PyQt4.QtGui.QDoubleSpinBox import setObjectName [as 别名]
 def spinBoxFromHabName(self,habname):
     """
     If the spin box exists, return it. If not make it and return it.
     """
     #print "looking for habname: %s" % habname
     sbname = slugify( unicode(habname) ) + u"SpinBox"
     htw = self.habitatTableWidget
     try:
         sb = htw.findChild(QDoubleSpinBox,sbname)
         assert( sb!=None )
         return sb
     except AssertionError:
         #print "making SB: %s" % sbname
         newsb = QDoubleSpinBox(self.habitatTableWidget)
         newsb.setMaximum(1.0)
         newsb.setSingleStep(0.1)
         newsb.setObjectName(_fromUtf8(sbname))
         return newsb
开发者ID:jkibele,项目名称:benthic_photo_survey,代码行数:20,代码来源:bps_gui.py


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