A borderless window in Qt for Windows that supports native features: aero snap, DWM resize, and minimization

I am trying to create a borderless window in Qt on Windows that supports native functions: aero snap, DWM resize and minimization, shake, etc. Like Office 2013 or Visual Studio 2012. But they are written in wpf. There are many examples in wpf and pure WinApi, but I could not find any Qt example.

I recently found the Blizzard Battle.net app ( screenshot ). They use QT 4.8.5, and their main window looks and behaves exactly the way I want in my application.

Does anyone know how to do this?

Thank you for your help.

+8
c ++ windows qt aero borderless
source share
2 answers

I have found a workaround for this problem.

Instead of using the main Qt window, I created a simple window without WinAPI fields, for example, in this SO discussion . Then I added a QWinWidget from the QtWinMigrate project and populated it with a window.

As a result, the main window and resizable edges are processed using WinAPI, and everything inside the main window is processed by QWinWidget. And with QWinWidget you can create a Qt gui, as in any other Qt application.

Here is a small project on GitHub.

+7
source share

Perhaps this may help you, the Qt WinExtras Windows classes

http://qt-project.org/doc/qt-5/qtwin.html

http://qt-project.org/doc/qt-5/qtwinextras-module.html

Alternatively, you can use QT Quick 2.0 to create a user interface similar to WPF.

+1
source share

All Articles