本文整理汇总了Python中qtpy.QtWidgets.QApplication.cursorFlashTime方法的典型用法代码示例。如果您正苦于以下问题:Python QApplication.cursorFlashTime方法的具体用法?Python QApplication.cursorFlashTime怎么用?Python QApplication.cursorFlashTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qtpy.QtWidgets.QApplication
的用法示例。
在下文中一共展示了QApplication.cursorFlashTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_page
# 需要导入模块: from qtpy.QtWidgets import QApplication [as 别名]
# 或者: from qtpy.QtWidgets.QApplication import cursorFlashTime [as 别名]
def setup_page(self):
self.ICON = ima.icon('genprefs')
newcb = self.create_checkbox
# --- Interface
general_group = QGroupBox(_("General"))
languages = LANGUAGE_CODES.items()
language_choices = sorted([(val, key) for key, val in languages])
language_combo = self.create_combobox(_('Language:'),
language_choices,
'interface_language',
restart=True)
opengl_options = ['Automatic', 'Desktop', 'Software', 'GLES']
opengl_choices = list(zip(opengl_options,
[c.lower() for c in opengl_options]))
opengl_combo = self.create_combobox(_('Rendering engine:'),
opengl_choices,
'opengl',
restart=True)
single_instance_box = newcb(_("Use a single instance"),
'single_instance',
tip=_("Set this to open external<br> "
"Python files in an already running "
"instance (Requires a restart)"))
prompt_box = newcb(_("Prompt when exiting"), 'prompt_on_exit')
popup_console_box = newcb(_("Show internal Spyder errors to report "
"them to Github"), 'show_internal_errors')
check_updates = newcb(_("Check for updates on startup"),
'check_updates_on_startup')
# Decide if it's possible to activate or not single instance mode
if running_in_mac_app():
self.set_option("single_instance", True)
single_instance_box.setEnabled(False)
comboboxes_advanced_layout = QHBoxLayout()
cbs_adv_grid = QGridLayout()
cbs_adv_grid.addWidget(language_combo.label, 0, 0)
cbs_adv_grid.addWidget(language_combo.combobox, 0, 1)
cbs_adv_grid.addWidget(opengl_combo.label, 1, 0)
cbs_adv_grid.addWidget(opengl_combo.combobox, 1, 1)
comboboxes_advanced_layout.addLayout(cbs_adv_grid)
comboboxes_advanced_layout.addStretch(1)
general_layout = QVBoxLayout()
general_layout.addLayout(comboboxes_advanced_layout)
general_layout.addWidget(single_instance_box)
general_layout.addWidget(prompt_box)
general_layout.addWidget(popup_console_box)
general_layout.addWidget(check_updates)
general_group.setLayout(general_layout)
# --- Theme
interface_group = QGroupBox(_("Interface"))
vertdock_box = newcb(_("Vertical title bars in panes"),
'vertical_dockwidget_titlebars')
verttabs_box = newcb(_("Vertical tabs in panes"),
'vertical_tabs')
animated_box = newcb(_("Animated toolbars and panes"),
'animated_docks')
tear_off_box = newcb(_("Tear off menus"), 'tear_off_menus',
tip=_("Set this to detach any<br> "
"menu from the main window"))
margin_box = newcb(_("Custom margin for panes:"),
'use_custom_margin')
margin_spin = self.create_spinbox("", _("pixels"), 'custom_margin',
0, 0, 30)
margin_box.toggled.connect(margin_spin.spinbox.setEnabled)
margin_box.toggled.connect(margin_spin.slabel.setEnabled)
margin_spin.spinbox.setEnabled(self.get_option('use_custom_margin'))
margin_spin.slabel.setEnabled(self.get_option('use_custom_margin'))
cursor_box = newcb(_("Cursor blinking:"),
'use_custom_cursor_blinking')
cursor_spin = self.create_spinbox(
"", _("ms"),
'custom_cursor_blinking',
default=QApplication.cursorFlashTime(),
min_=0, max_=5000, step=100)
cursor_box.toggled.connect(cursor_spin.spinbox.setEnabled)
cursor_box.toggled.connect(cursor_spin.slabel.setEnabled)
cursor_spin.spinbox.setEnabled(
self.get_option('use_custom_cursor_blinking'))
cursor_spin.slabel.setEnabled(
self.get_option('use_custom_cursor_blinking'))
margins_cursor_layout = QGridLayout()
margins_cursor_layout.addWidget(margin_box, 0, 0)
margins_cursor_layout.addWidget(margin_spin.spinbox, 0, 1)
margins_cursor_layout.addWidget(margin_spin.slabel, 0, 2)
margins_cursor_layout.addWidget(cursor_box, 1, 0)
margins_cursor_layout.addWidget(cursor_spin.spinbox, 1, 1)
margins_cursor_layout.addWidget(cursor_spin.slabel, 1, 2)
margins_cursor_layout.setColumnStretch(2, 100)
#.........这里部分代码省略.........