久久久久久久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 對(duì)話(huà)窗口中記錄按下的組合鍵

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

      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 對(duì)話(huà)窗口中記錄按下的組合鍵的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我從主窗口打開(kāi)對(duì)話(huà)框,通過(guò)夾住鍵,我在行中填入它們的名稱(chēng).問(wèn)題是我不明白你需要在哪里循環(huán)檢查所有鍵的狀態(tài).也許還有另一種方法可以按下按鍵?或者哪里需要監(jiān)聽(tīng),讓對(duì)話(huà)框不掛起,字符串更新.

                  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_())
                  

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

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

                  相關(guān)文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數(shù)綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動(dòng)后進(jìn)度躍升至 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 刻度標(biāo)簽設(shè)置在固定位置,以便當(dāng)我向左或向右滾動(dòng)時(shí),yaxis 刻度標(biāo)簽應(yīng)該可見(jiàn)
                  `QImage` constructor has unknown keyword `data`(`QImage` 構(gòu)造函數(shù)有未知關(guān)鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時(shí)顯示進(jìn)度條?)

                  <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>
                            主站蜘蛛池模板: 精品熟人一区二区三区四区 | 91传媒在线观看 | 免费视频一区二区 | 精品91久久久| 日韩在线| 国产精品三级 | www久久99 | 欧美精品二区 | 亚洲一区二区免费视频 | 亚洲国产成人精品久久久国产成人一区 | 国产日产欧产精品精品推荐蛮挑 | 精品久久精品 | 亚洲精品美女 | 国产福利一区二区 | 精品久久久久香蕉网 | 欧美精品一区三区 | 色播av| 国产综合区 | 国产福利视频导航 | 日本福利片| 神马久久av | 91人人看 | 不卡视频一区二区三区 | 91麻豆精品国产91久久久更新资源速度超快 | 成人片在线看 | 三级在线视频 | 91久久精品一区二区二区 | www精品美女久久久tv | 四虎影视在线 | 99热最新网址 | 日韩视频免费 | 午夜一区二区三区在线观看 | 亚洲精品大全 | 日本黄色一级片视频 | 亚洲啪啪 | 久久综合激情 | 无码日韩精品一区二区免费 | 一级大片网站 | a久久 | 亚洲精品乱码久久久久久蜜桃 | 国产视频线观看永久免费 |