本文整理汇总了Python中PyQt4.Qt.QInputDialog.getInt方法的典型用法代码示例。如果您正苦于以下问题:Python QInputDialog.getInt方法的具体用法?Python QInputDialog.getInt怎么用?Python QInputDialog.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qt.QInputDialog
的用法示例。
在下文中一共展示了QInputDialog.getInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: go_to_line_number
# 需要导入模块: from PyQt4.Qt import QInputDialog [as 别名]
# 或者: from PyQt4.Qt.QInputDialog import getInt [as 别名]
def go_to_line_number(self):
ed = self.gui.central.current_editor
if ed is None or not ed.has_line_numbers:
return
num, ok = QInputDialog.getInt(self.gui, _('Enter line number'), ('Line number:'), ed.current_line, 1, max(100000, ed.number_of_lines))
if ok:
ed.current_line = num
示例2: blur_image
# 需要导入模块: from PyQt4.Qt import QInputDialog [as 别名]
# 或者: from PyQt4.Qt.QInputDialog import getInt [as 别名]
def blur_image(self):
val, ok = QInputDialog.getInt(
self,
_("Blur image"),
_("The standard deviation for the Gaussian blur operation (higher means more blurring)"),
value=3,
min=1,
max=20,
)
if ok:
self.canvas.blur_image(sigma=val)
示例3: sharpen_image
# 需要导入模块: from PyQt4.Qt import QInputDialog [as 别名]
# 或者: from PyQt4.Qt.QInputDialog import getInt [as 别名]
def sharpen_image(self):
val, ok = QInputDialog.getInt(
self,
_("Sharpen image"),
_("The standard deviation for the Gaussian sharpen operation (higher means more sharpening)"),
value=3,
min=1,
max=20,
)
if ok:
self.canvas.sharpen_image(sigma=val)