Aero Snap - Qt Main Window
-
I have a Qt Main Window, and I would like for it to have a custom titlebar while still behaving as though it was a part of Window's default DWM. Similar in effect to Photoshop CS6, or Steam or the New Spotify. One method I know of is handle the WM_NCCALCSIZE MSG in QtCoreApplication native filtering, but this introduces issues and conflicts with Qt's Borderless windows. So in essence how do I have a titlebar that aero-snaps similar to Photoshop or Steam, while also being draggable?
edit: I feel that "this question from SO":https://stackoverflow.com/questions/16765561/borderless-window-using-areo-snap-shadow-minimize-animation-and-shake may be of use.
-
Aero-Snap is the animated glass maximization effect behind the window, and the window then snapping to maximized when you grab it by the title bar and drag to the top. The problem is that when you go borderless you have no "Native" title bar that does that. What WM_NCCALCSIZE does is instead just draw over the title bar if I am not mistaken. I am just trying to find out if there is a Qt version of this instead of me overriding Qt.
ex: "Youtube":https://www.youtube.com/watch?v=sS7a0xDwvlM
-
check out "this":http://stackoverflow.com/questions/16765561/borderless-window-using-areo-snap-shadow-minimize-animation-and-shake link. It seems that aero snap is only possible when using the windows-provided border
-
I have a very good demo for it, even though its pure Win32 API implemented, but I think it's would be your requirements.
https://github.com/melak47/BorderlessWindow
The following may be the Qt way to solve this problem, but I didn't test it:
https://github.com/deimos1877/BorderlessWindow