PDA

View Full Version : Make a widget resizable by user - does it exist in Qt?



Grzyboo
27th July 2015, 20:34
I need to make user possible to resize a Label or PlainTextEdit object. I mean the thing like in Qt Creator. If you select your widget some squares appear on it's corner and on halves of the edges. If you move a square you can resize your object. I need to make the exact same thing inside a Qt window. Is it possible to make it faster rather than just drawing all squares with code and catching the moment when user grabs a square and moves it?
I'm wondering since Qt is written in Qt... Maybe there is an easy option.

Radek
28th July 2015, 07:43
AFAIK, it isn't. You need to do everything yourself. Sorry. The QWidget class offers all needed tools for it (except drawing the squares).

Grzyboo
28th July 2015, 11:16
Well, thanks. It doesn't seem like a really hard task so I think it's fine.
I just wanted to know since it's used in QtCreator, it was reasonable to think that some part of it might have been put in Qt tools.