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

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -