[Qt][ubuntu 13.04]setWindowFlags的使用

本文介绍了Qt中用于定制顶级窗口外观的多个标志。这些标志仅作用于顶级窗口,并提供了如固定大小对话框边界、自定义显示上下文等功能。此外还详细解释了如何创建无边框窗口及禁用窗口阴影等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值