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


Python QInputDialog.getInt方法代码示例

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


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

示例1: change_history_depth

# 需要导入模块: from qtpy.QtWidgets import QInputDialog [as 别名]
# 或者: from qtpy.QtWidgets.QInputDialog import getInt [as 别名]
 def change_history_depth(self):
     "Change history max entries" ""
     depth, valid = QInputDialog.getInt(
         self, _("History"), _("Maximum entries"), self.get_option("max_entries"), 10, 10000
     )
     if valid:
         self.set_option("max_entries", depth)
开发者ID:silentquasar,项目名称:spyder,代码行数:9,代码来源:history.py

示例2: change_max_line_count

# 需要导入模块: from qtpy.QtWidgets import QInputDialog [as 别名]
# 或者: from qtpy.QtWidgets.QInputDialog import getInt [as 别名]
 def change_max_line_count(self):
     "Change maximum line count"""
     mlc, valid = QInputDialog.getInt(self, _('Buffer'),
                                        _('Maximum line count'),
                                        self.get_option('max_line_count'),
                                        0, 1000000)
     if valid:
         self.shell.setMaximumBlockCount(mlc)
         self.set_option('max_line_count', mlc)
开发者ID:burrbull,项目名称:spyder,代码行数:11,代码来源:plugin.py

示例3: _add_fittable_model

# 需要导入模块: from qtpy.QtWidgets import QInputDialog [as 别名]
# 或者: from qtpy.QtWidgets.QInputDialog import getInt [as 别名]
    def _add_fittable_model(self, model_type):
        if issubclass(model_type, models.Polynomial1D):
            text, ok = QInputDialog.getInt(self, 'Polynomial1D',
                                           'Enter Polynomial1D degree:')
            # User decided not to create a model after all
            if not ok:
                return

            model = model_type(int(text))
        else:
            model = model_type()

        # Grab any user-defined regions so we may initialize parameters only
        # for the selected data.
        mask = self.hub.region_mask
        spec = self._get_selected_plot_data_item().data_item.spectrum

        # Initialize the parameters
        model = initialize(model, spec.spectral_axis[mask], spec.flux[mask])

        self._add_model(model)
开发者ID:nmearl,项目名称:specviz,代码行数:23,代码来源:model_editor.py


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