Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Resize frameless window
beowulf last edited by
Hi guys, i'm trying to resize my frameless window.
I can do this using QSizeGrip, but it's different from the original. Example:
How to make a frameless window resize like the "original"?
Well, frames serve exactly that purpose so it's a little weird to remove them and try to mimic their functionality, unless you're trying to style the window on you're own of course.
What you can do is sorta drag and drop. On mouse press determine if and on which border or corner user has pressed and store it in some variable. On mouse move check if you're in a "drag mode" via the said variable and if you are, resize and move the window in the appropriate direction. On mouse release clear the variable.
Since you're on Windows 7 (judging by the screenshot) don't forget to also handle things like double-click on the upper edge to maximize/demaximize, snap a window to an edge/maximize when dragged to a screen border, demaximize by dragging a window down. Some of those may require you to use some native Window APIs.