久久久久久久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>
                            主站蜘蛛池模板: 日韩精品一区二区三区中文在线 | 亚洲在线看 | 国产精品99久久久久久宅男 | 成人欧美一区二区三区黑人孕妇 | 亚洲精品一区二区 | 国产三区在线观看视频 | 久久精品国产99国产 | 成人午夜视频在线观看 | 少妇性l交大片免费一 | 桃花av在线 | 日日操视频 | 亚洲精品一区中文字幕 | 欧美日产国产成人免费图片 | 国产成人在线一区二区 | 精品日本中文字幕 | 在线日韩福利 | 国产高清在线精品一区二区三区 | 免费一级做a爰片久久毛片潮喷 | 日本欧美在线观看视频 | 国产精品一区二区三区在线 | 天堂中文资源在线 | 国产精品久久久久999 | 国产欧美日韩在线播放 | 精品欧美一区二区精品久久 | 精品久久久久久久久久久久 | 国产一区欧美一区 | 亚洲一区二区免费 | 在线观看免费黄色片 | 国产乱码精品一品二品 | 国产欧美日韩一区二区三区在线观看 | 欧美精品福利 | 成人在线精品视频 | 日本不卡一区 | 欧洲精品一区 | 免费久久99精品国产婷婷六月 | 中文字幕11页 | 夜夜操天天干 | 日本精品视频在线观看 | 国产精品久久亚洲7777 | 精品久久久网站 | 2022精品国偷自产免费观看 |