找回密码
 立即注册
收起左侧

窗口最大化,保留标题栏,遮挡任务栏

3
回复
8704
查看
[复制链接]
累计签到:1553 天
连续签到:1 天
来源: 2016-4-22 15:03:30 显示全部楼层 |阅读模式
5Qter豆
我想要我的窗口最大化时保留标题栏,遮挡系统任务栏;
可是使用showMaximized()不能遮挡任务栏;
而使用showFullScreen()时是没有标题栏的;
怎么办呢?

最佳答案

查看完整内容

Qt::WindowStaysOnTopHint 0x00040000 Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-4-22 15:03:31 显示全部楼层
waitingdeng 发表于 2016-4-25 15:51
好像不行啊;
不能遮挡任务栏哈

Qt::WindowStaysOnTopHint        0x00040000        Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
参与人数 1人气 +2 收起 理由
waitingdeng + 2

查看全部评分总评分 : 人气 +2

回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-4-23 09:33:01 显示全部楼层
不用那个接口,获取屏幕的分辨率,然后把窗体设置成屏幕的大小
回复

使用道具 举报

累计签到:1553 天
连续签到:1 天
2016-4-25 15:51:14 显示全部楼层
sywh 发表于 2016-4-23 09:33
不用那个接口,获取屏幕的分辨率,然后把窗体设置成屏幕的大小

好像不行啊;
不能遮挡任务栏哈

点评

Qt::WindowStaysOnTopHint 0x00040000 Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindo  详情 回复 发表于 2016-4-27 08:50
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了