Aero Snap - Qt Main Window
-
wrote on 18 Apr 2014, 02:55 last edited by
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.
-
wrote on 18 Apr 2014, 03:06 last edited by
I'm not an expert on windows: what is aero-snap? I just made [as in 5 minutes ago] a title bar based on a QToolBar. Its incomplete but the idea is there.
-
wrote on 18 Apr 2014, 03:13 last edited by
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
-
wrote on 18 Apr 2014, 03:28 last edited by
Ok I know what your talking about, just didn't know it was called aero-snap. You learn something new everyday :) ! I don't think Qt has a feature to do that, but I could be wrong.
-
wrote on 18 Apr 2014, 03:35 last edited by
I am sure there must be some way of doing this? My main target for this project is Windows, but I truly do wish to use Qt instead of trying to use Mono/C# so that I can have Cross-Platform ability.
-
wrote on 18 Apr 2014, 04:36 last edited by
You could try to implement it yourself, but I'm not exactly sure how. Obviously the Aero-Snap feature is not cross platform, so if you go to the effort of implementing it, it will only be usable on windows. But don't let me dissuade you!
-
wrote on 18 Apr 2014, 04:43 last edited by
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
-
wrote on 18 Apr 2014, 13:20 last edited by
I am aware of this, but Qt does natively use the Windows Titlebar. I know this has been done using Qt so it is most definitely possible. I am just not sure how to do it...
-
wrote on 19 Apr 2014, 16:15 last edited by
Sorry I can't be of much help :( I hope you figure it out!
-
wrote on 28 Oct 2014, 15:40 last edited by
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