本文整理汇总了Python中PyQt5.QtCore.Qt.Key_Q方法的典型用法代码示例。如果您正苦于以下问题:Python Qt.Key_Q方法的具体用法?Python Qt.Key_Q怎么用?Python Qt.Key_Q使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtCore.Qt
的用法示例。
在下文中一共展示了Qt.Key_Q方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import Key_Q [as 别名]
def __init__(self, parent=None, plugins=None, fullscreen=False):
super(DeenGui, self).__init__(parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.plugins = plugins
self.widgets = []
self.ui.actionLoad_from_file.triggered.connect(self.load_from_file)
self.ui.actionQuit.triggered.connect(QApplication.quit)
self.ui.actionAbout.triggered.connect(self.show_about)
self.ui.actionStatus_console.triggered.connect(self.show_status_console)
self.ui.actionTop_to_bottom.triggered.connect(self.set_widget_direction_toptobottom)
self.ui.actionLeft_to_right.triggered.connect(self.set_widget_direction_lefttoright)
# Set default direction
self.set_widget_direction_toptobottom()
self.ui.actionCopy_to_clipboard.triggered.connect(self.copy_content_to_clipboard)
self.ui.actionSave_content_to_file.triggered.connect(self.save_widget_content_to_file)
self.ui.actionSearch.triggered.connect(self.toggle_search_box_visibility)
self.widgets.append(DeenEncoderWidget(self))
for widget in self.widgets:
self.ui.encoder_widget_layout.addWidget(widget)
self.load_from_file_dialog = QFileDialog(self)
self.setWindowTitle('deen')
self.log = DeenLogger(self)
self.widgets[0].set_field_focus()
# Add action fuzzy search
self.fuzzy_search_ui = FuzzySearchUi(self)
self.fuzzy_search_action_shortcut = QShortcut(QKeySequence(Qt.CTRL | Qt.Key_R), self)
self.fuzzy_search_action_shortcut.activated.connect(self.fuzzy_search_action)
self.clear_current_widget_shortcut = QShortcut(QKeySequence(Qt.CTRL | Qt.Key_Q), self)
self.clear_current_widget_shortcut.activated.connect(self.clear_current_widget)
self.hide_search_box_shortcut = QShortcut(QKeySequence(Qt.CTRL | Qt.Key_F), self)
self.hide_search_box_shortcut.activated.connect(self.toggle_search_box_visibility)
self.next_encoder_widget_shortcut = QShortcut(QKeySequence(Qt.ALT | Qt.Key_Right), self)
self.next_encoder_widget_shortcut.activated.connect(self.toggle_next_encoder_focus)
self.prev_encoder_widget_shortcut = QShortcut(QKeySequence(Qt.ALT | Qt.Key_Left), self)
self.prev_encoder_widget_shortcut.activated.connect(self.toggle_prev_encoder_focus)
if fullscreen:
self.showMaximized()
self.show()