pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <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="h7rrfjx" 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="xntjnph" 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="ftfplxf" 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>
                            主站蜘蛛池模板: 微信聊天记录恢复_手机短信删除怎么恢复_通讯录恢复软件下载-快易数据恢复 | 钢结构-钢结构厂房-钢结构工程[江苏海逵钢构厂] | 氧化铝球_高铝球_氧化铝研磨球-淄博誉洁陶瓷新材料有限公司 | 粉末包装机-给袋式包装机-全自动包装机-颗粒-液体-食品-酱腌菜包装机生产线【润立机械】 | 搅拌磨|搅拌球磨机|循环磨|循环球磨机-无锡市少宏粉体科技有限公司 | 云南标线|昆明划线|道路标线|交通标线-就选云南云路施工公司-云南云路科技有限公司 | 一体化隔油提升设备-餐饮油水分离器-餐厨垃圾处理设备-隔油池-盐城金球环保产业发展有限公司 | 二次元影像仪|二次元测量仪|拉力机|全自动影像测量仪厂家_苏州牧象仪器 | 自动焊锡机_点胶机_螺丝机-锐驰机器人| 新疆散热器,新疆暖气片,新疆电锅炉,光耀暖通公司 | 通信天线厂家_室分八木天线_对数周期天线_天线加工厂_林创天线源头厂家 | 面粉仓_储酒罐_不锈钢储酒罐厂家-泰安鑫佳机械制造有限公司 | 宜兴市恺瑞德环保科技有限公司| 手持式线材张力计-套帽式风量罩-深圳市欧亚精密仪器有限公司 | 北京乾茂兴业科技发展有限公司 | 油冷式_微型_TDY电动滚筒_外装_外置式电动滚筒厂家-淄博秉泓机械有限公司 | 金刚网,金刚网窗纱,不锈钢网,金刚网厂家- 河北萨邦丝网制品有限公司 | 温湿度记录纸_圆盘_横河记录纸|霍尼韦尔记录仪-广州汤米斯机电设备有限公司 | 机房监控|动环监控|动力环境监控系统方案产品定制厂家 - 迈世OMARA | 海尔生物医疗四川代理商,海尔低温冰箱四川销售-成都壹科医疗器械有限公司 | 全温恒温摇床-水浴气浴恒温摇床-光照恒温培养摇床-常州金坛精达仪器制造有限公司 | 厂房出售_厂房仓库出租_写字楼招租_土地出售-中苣招商网-中苣招商网 | 石家庄网站建设|石家庄网站制作|石家庄小程序开发|石家庄微信开发|网站建设公司|网站制作公司|微信小程序开发|手机APP开发|软件开发 | 铝合金线槽_铝型材加工_空调挡水板厂家-江阴炜福金属制品有限公司 | 上海橡胶接头_弹簧减震器_金属软接头厂家-上海淞江集团 | 广州办公室设计,办公室装修,写字楼设计,办公室装修公司_德科 | 塑料检查井_双扣聚氯乙烯增强管_双壁波纹管-河南中盈塑料制品有限公司 | 搅拌磨|搅拌球磨机|循环磨|循环球磨机-无锡市少宏粉体科技有限公司 | 贴片电感_贴片功率电感_贴片绕线电感_深圳市百斯特电子有限公司 贴片电容代理-三星电容-村田电容-风华电容-国巨电容-深圳市昂洋科技有限公司 | hdpe土工膜-防渗膜-复合土工膜-长丝土工布价格-厂家直销「恒阳新材料」-山东恒阳新材料有限公司 ETFE膜结构_PTFE膜结构_空间钢结构_膜结构_张拉膜_浙江萬豪空间结构集团有限公司 | 诚暄电子公司首页-线路板打样,pcb线路板打样加工制作厂家 | 熔体泵|换网器|熔体齿轮泵|熔体计量泵厂家-郑州巴特熔体泵有限公司 | 螺旋压榨机-刮泥机-潜水搅拌机-电动泥斗-潜水推流器-南京格林兰环保设备有限公司 | 阿里巴巴诚信通温州、台州、宁波、嘉兴授权渠道商-浙江联欣科技提供阿里会员办理 | 丹佛斯压力传感器,WISE温度传感器,WISE压力开关,丹佛斯温度开关-上海力笙工业设备有限公司 | 灌木树苗-绿化苗木-常绿乔木-价格/批发/基地 - 四川成都途美园林 | 北京翻译公司_同传翻译_字幕翻译_合同翻译_英语陪同翻译_影视翻译_翻译盖章-译铭信息 | 瑞典Blueair空气净化器租赁服务中心-专注新装修办公室除醛去异味服务! | 高铝轻质保温砖_刚玉莫来石砖厂家_轻质耐火砖价格 | 广州冷却塔维修厂家_冷却塔修理_凉水塔风机电机填料抢修-广东康明节能空调有限公司 | 碳纤维复合材料制品生产定制工厂订制厂家-凯夫拉凯芙拉碳纤维手机壳套-碳纤维雪茄盒外壳套-深圳市润大世纪新材料科技有限公司 |