久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='sF0ZV'></bdo><ul id='sF0ZV'></ul>
    <tfoot id='sF0ZV'></tfoot>
  • <legend id='sF0ZV'><style id='sF0ZV'><dir id='sF0ZV'><q id='sF0ZV'></q></dir></style></legend>

      <small id='sF0ZV'></small><noframes id='sF0ZV'>

        <i id='sF0ZV'><tr id='sF0ZV'><dt id='sF0ZV'><q id='sF0ZV'><span id='sF0ZV'><b id='sF0ZV'><form id='sF0ZV'><ins id='sF0ZV'></ins><ul id='sF0ZV'></ul><sub id='sF0ZV'></sub></form><legend id='sF0ZV'></legend><bdo id='sF0ZV'><pre id='sF0ZV'><center id='sF0ZV'></center></pre></bdo></b><th id='sF0ZV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='sF0ZV'><tfoot id='sF0ZV'></tfoot><dl id='sF0ZV'><fieldset id='sF0ZV'></fieldset></dl></div>

      1. 如何在 PyQT5 對話窗口中記錄按下的組合鍵

        How to record a pressed key combination in the PyQT5 dialog window(如何在 PyQT5 對話窗口中記錄按下的組合鍵)

      2. <i id='hDKhG'><tr id='hDKhG'><dt id='hDKhG'><q id='hDKhG'><span id='hDKhG'><b id='hDKhG'><form id='hDKhG'><ins id='hDKhG'></ins><ul id='hDKhG'></ul><sub id='hDKhG'></sub></form><legend id='hDKhG'></legend><bdo id='hDKhG'><pre id='hDKhG'><center id='hDKhG'></center></pre></bdo></b><th id='hDKhG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hDKhG'><tfoot id='hDKhG'></tfoot><dl id='hDKhG'><fieldset id='hDKhG'></fieldset></dl></div>
        <legend id='hDKhG'><style id='hDKhG'><dir id='hDKhG'><q id='hDKhG'></q></dir></style></legend>
            <tbody id='hDKhG'></tbody>
            <bdo id='hDKhG'></bdo><ul id='hDKhG'></ul>

                <tfoot id='hDKhG'></tfoot>
              • <small id='hDKhG'></small><noframes id='hDKhG'>

                1. 本文介紹了如何在 PyQT5 對話窗口中記錄按下的組合鍵的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我從主窗口打開對話框,通過夾住鍵,我在行中填入它們的名稱.問題是我不明白你需要在哪里循環檢查所有鍵的狀態.也許還有另一種方法可以按下按鍵?或者哪里需要監聽,讓對話框不掛起,字符串更新.

                  I open the dialog from the main window, where by clamping the keys, I fill the line with their names. The problem is that I can not understand where you need to do a cycle of checking all the keys on their state. Maybe there is another way to get the keys pressed? Or where you need to listen to the clamping so that the dialog box does not hang and the string is updated.

                  MainWindow:
                      def showBindings(self, param):
                          from dialogs import KeyBindingsDialog
                          self.dialog = KeyBindingsDialog()
                          self.dialog.show()
                  
                  Dialog:
                  class KeyBindingsDialog(QtWidgets.QDialog):
                      def __init__(self, parent=None):
                          super(KeyBindingsDialog, self).__init__(parent)
                          self.ui = KeyBindings()
                          self.ui.setupUi(self)
                  

                  推薦答案

                  使用QKeySequenceEdit:

                  Use QKeySequence

                  from PyQt5 import QtCore, QtGui, QtWidgets
                  
                  class KeySequenceEdit(QtWidgets.QKeySequenceEdit):
                      def keyPressEvent(self, event):
                          super(KeySequenceEdit, self).keyPressEvent(event)
                          seq_string = self.keySequence().toString(QtGui.QKeySequence.NativeText)
                          if seq_string:
                              last_seq = seq_string.split(",")[-1].strip()
                              le = self.findChild(QtWidgets.QLineEdit, "qt_keysequenceedit_lineedit")
                              self.setKeySequence(QtGui.QKeySequence(last_seq))
                              le.setText(last_seq)
                              self.editingFinished.emit()
                  
                  
                  class Widget(QtWidgets.QWidget):
                      def __init__(self, parent=None):
                          super(Widget, self).__init__(parent)
                          self._keysequenceedit = KeySequenceEdit(editingFinished=self.on_editingFinished)
                          button = QtWidgets.QPushButton("clear", clicked=self._keysequenceedit.clear)
                          hlay = QtWidgets.QHBoxLayout(self)
                          hlay.addWidget(self._keysequenceedit)
                          hlay.addWidget(button)
                  
                      @QtCore.pyqtSlot()
                      def on_editingFinished(self):
                          sequence = self._keysequenceedit.keySequence()
                          seq_string = sequence.toString(QtGui.QKeySequence.NativeText)
                          print("sequence: ", seq_string)
                  
                  if __name__ == '__main__':
                      import sys 
                      app = QtWidgets.QApplication(sys.argv)
                      w = Widget()
                      w.show()
                      sys.exit(app.exec_())
                  

                  這篇關于如何在 PyQT5 對話窗口中記錄按下的組合鍵的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)

                  <small id='7Pki8'></small><noframes id='7Pki8'>

                2. <i id='7Pki8'><tr id='7Pki8'><dt id='7Pki8'><q id='7Pki8'><span id='7Pki8'><b id='7Pki8'><form id='7Pki8'><ins id='7Pki8'></ins><ul id='7Pki8'></ul><sub id='7Pki8'></sub></form><legend id='7Pki8'></legend><bdo id='7Pki8'><pre id='7Pki8'><center id='7Pki8'></center></pre></bdo></b><th id='7Pki8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7Pki8'><tfoot id='7Pki8'></tfoot><dl id='7Pki8'><fieldset id='7Pki8'></fieldset></dl></div>

                    • <bdo id='7Pki8'></bdo><ul id='7Pki8'></ul>

                            <tbody id='7Pki8'></tbody>
                          1. <tfoot id='7Pki8'></tfoot>
                            <legend id='7Pki8'><style id='7Pki8'><dir id='7Pki8'><q id='7Pki8'></q></dir></style></legend>
                            主站蜘蛛池模板: 在线色综合 | 久久精品中文 | 伊人999 | 一区二区在线视频 | 国产乱人伦 | 国产在线视频一区二区 | 日韩欧美高清 | 激情播播网 | 国产视频一区在线观看 | 中文在线字幕免费观 | 国产精品第一 | 999精品视频 | 日本成片网 | 久久国产精品一区二区 | 亚洲综合激情网 | 亚洲天天干 | 色综合婷婷 | 一级毛片大全 | 99热精品在线观看 | 激情影院在线观看 | 亚洲精品三区 | 久久精品国产亚洲 | 久久久久久网 | 国产伦精品一区二区三区免费视频 | 中文字幕网址在线 | 亚洲天堂久久 | 午夜天堂网 | 日韩高清精品免费观看 | 操久| 中文字幕在线观看一区二区三区 | 欧美精品www | 成人欧美日韩 | 一二三四区在线观看 | 蜜桃精品一区二区三区 | 日韩福利视频 | 视频一区二区在线播放 | 成人在线视频网站 | 91视频一区二区三区 | 色中色综合 | 国产成人精品网站 | 国产乱码久久久久久 |