You can subclass QTextEdit and implement the added functionality. In Designer you can then promote your QTextEdit widget to your subclass, hence avoiding the need to alter uic generated code.