简体   繁体   中英

QMainWindow with Qt::CustomizeWindowHint flag doesn't work aero snap

I made a window using QMainWindow with Qt::CustomizeWindowHint flag to remove title bar. I made a new title bar using my customized widget and implemented window move function. So my window widget does not work with aero-snap on moving window. (And my window doesn't work with aero-snap on resizing window) How can I use aero snap with my customized widget? Or do you know the apis of aero snap? I found some web pages related to aero snap apis, but they say about c# only What is the Aero function for previewing the screen state behind a window? How can I use the functions on C++? thanks.

Aero Snap can't be achieved when using CustomizeWindowHint to remove the title bar.

The title bar comes with implicit functionality that is controlled by the window manager, and this functionality includes some of the things you might have already noticed as missing: minimize, maximize, resize, move, system menu, etc.

Removing the title bar is essentially removing any native window manager support, and you're required to implement these features yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM