Important: Please read the Qt Code of Conduct -

How to get the draging rectangle for resizing!

  • Hi all, I would like to get a draging rectangle so that I can resize
    a widget with mouse positioned at the 8 specific point draging
    around, which is somewhat like a QRubberBand, just like in the
    folloing picture. But I don't have any idea which class should I use.
    Could anyone please give some advice?

    alt text

  • Lifetime Qt Champion


    One possibility could be to use a QRubberBand as base class, override the paint event to draw the height active points and then mousePress/Move/Release events to handle the resizing part.

    Hope it helps

Log in to reply