Adding status bar to QTextEdit
-
Using the example code in your post about
super
to add a statusbar to a QTextEdit looks more complicated than the compound widget approach. It's still not clear to me why you think that it will be so hard to modify your code to use a custom compound widget in place of a QTextEdit. -
super
has nothing to do with the status bar issue. It's just someone's code style. You can do the same without it.And yes, the posted solution has issues, hardcoded values and styles and is generally mega-super-ugly. Whatever hackery code you can come up with is gonna have issues and be worse than the correct solution - put text edit and status bar separately in a container widget. That is how you're supposed to compose widgets in Qt, whether you like it or not. It's just a couple lines of code more, certainly a lot easier than that thing.