Best practice: resize Widgets with mouse
Solved
General and Desktop
-
Hi all,
what is the best/easiest way to resize a (frameless) QWidget (any, but in a special case a QListWidget, that is not part of a layout) by mouse? (snap for example the lower right corner, click and move)
-
Hi
Best is hard to define. :)
easist, find some code and reuse :)This one did it with
https://forum.qt.io/topic/66586/make-a-frameless-qwidget-resizable-with-qrubberband/18alternativ
http://stackoverflow.com/questions/26281192/qt-resizing-a-ui-element-with-the-mouse
Which is dead simple but dont fit all use cases. -
@the_
Yep its a nice few liners and not really dirty as sizegrip is made for such task so
its not abuse or anything :)
But sometimes having the grip there can be issue.
1/4