qt 一个应用程序有2个主窗口,任务栏只有一个应用程序图标

在Qt中,通过设置窗口标志Qt::Tool或Qt::SubWindow,可以使一个应用程序拥有两个主窗口,同时在任务栏只显示一个应用程序图标。这些窗口标志用于指定某些特殊情况下的窗口系统属性,部分依赖于底层窗口管理器的支持。

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

可以设置为Qt::Tool或者Qt::SubWindow就能实现这种一个应用程序有2个主窗口,任务栏只有一个应用程序图标

flags Qt::WindowFlags

This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them.

The main types are

Constant

Value

Description

Qt::Widget

0x00000000

This is the default type for QWidget. Widgets of this type are child widgets if they have a parent, and independent windows if they have no parent. See also Qt::Window and Qt::SubWindow.

Qt::Window

0x00000001

Indicates that the widget is a window, usually with a window system frame and a title bar, irrespective

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值