pyqt pyside QLineEdit 重写键盘事件
pyqt pyside QLineEdit 重写键盘事件
def keyPressEvent(self, event): if (event.modifiers() & QtCore.Qt.ShiftModifier): self.shift = True print 'Shift!' # call base class keyPressEvent QtGui.QLineEdit.keyPressEvent(self, event)
https://stackoverflow.com/questions/5047558/properly-handling-a-keypressevent-in-a-subclassed-pyqt-lineedit
未经博主允许,禁止直接转载本博客任何内容(可以在文章中添加链接,禁止原文照搬),如需直接原文转载对应文章,请在该文章中留言联系博主,谢谢!!