Adding a QSizeGrip to the corner of a QLabel
I’m attempting to produce a widget that consists of a text display that can be resized by the user grabbing the lower right corner. So far I’ve been able to generate this:
I’ve applied a read background to the layout to make it more obvious what’s going on. I’ve used the following code to generate this:
Basically, it’s a horizontal layout with the label and grip added to it, which is then installed on a QWidget. My problem is that I’d like the grip to be on the lower right corner of the label, rather than the parent widget. I’d also like to make it invisible while keeping it enabled.
Or perhaps I’m going about this the wrong way. My ultimate goal is to have a textual display widget that can be resized by the user either horizontally or vertically, but doesn’t have a visible grip that would obscure the text. Am I already on the right track with the code above, or is there a better way to achieve this?