setWindowFlags()
There are also a number of flags which you can use to customize the appearance of top-level windows. These have no effect on other windows:
只能影响置顶显示的窗口,对其它窗口不会有影响
| Constant | Value | Description |
| Qt::MSWindowsFixedSizeDialogHint | 0x00000100 | Gives the window a thin dialog border on Windows. This style is traditionally used for fixed-size dialogs. |
| Qt::MSWindowsOwnDC | 0x00000200 | Gives the window its own display context on Windows. |
| Qt::BypassWindowManagerHint | 0x00000400 | This flag can be used to indicate to the platform plugin that "all" window manager protocols should be disabled. This flag will behave different depending on what operating system the application is running on and what window manager is running. The flag can be used to get a native window with no configuration set. |
| Qt::X11BypassWindowManagerHint | BypassWindowManagerHint | Bypass the window manager completely. This results in a borderless window that is not managed at all (i.e., no keyboard input unless you call QWidget::activateWindow() manually). |
| Qt::FramelessWindowHint | 0x00000800 | Produces a borderless window. The user cannot move or resize a borderless window via the window system. On X11, the result of the flag is dependent on the window manager and its ability to understand Motif and/or NETWM hints. Most existing modern window managers can handle this. |
| Qt::NoDropShadowWindowHint | 0x40000000 | Disables window drop shadow on supporting platforms. |
本文介绍了Qt中用于定制顶级窗口外观的多个标志。这些标志仅作用于顶级窗口,并提供了如固定大小对话框边界、自定义显示上下文等功能。此外还详细解释了如何创建无边框窗口及禁用窗口阴影等。
7310

被折叠的 条评论
为什么被折叠?



