Restricting character input in custom Python Qt text editor? -
i interested in writing custom gui text editor of sorts dna using python , qt. editor restrict user input in text window letters (such atgc). best way of doing this?
you can use ignore
function. example:
def keypressevent(self, e): if e.key() == qtcore.qt.key_a: e.ignore()
Comments
Post a Comment