Skip to content

yjg30737/pyqt-showing-key-user-input-lineedit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqt-showing-key-user-input-lineedit

Detect the key which user input and show it on the lineedit.

Requirements

PyQt5 >= 5.8

Setup

pip3 install git+https://github.com/yjg30737/pyqt-showing-key-user-input-lineedit.git --upgrade

Example

Code Sample

from PyQt5.QtWidgets import QWidget, QGridLayout, QApplication
from pyqt_showing_key_user_input_lineedit import ShowingKeyUserInputLineEdit


class LineEditExample(QWidget):
    def __init__(self):
        super().__init__()
        self.__initUi()

    def __initUi(self):
        lineedit = ShowingKeyUserInputLineEdit()
        lay = QGridLayout()
        lay.addWidget(lineedit)
        self.setLayout(lay)


if __name__ == "__main__":
    import sys

    app = QApplication(sys.argv)
    example = LineEditExample()
    example.show()
    app.exec_()

Result

example.mp4

This QLineEdit show the key you pressed whether it is combination key or not.

Of course if you pressed Ctrl+Alt+Delete you will see the task manager or something.