在Qt中应用像Chrome一样的选项卡 [英] Apply chrome like tabs in Qt

查看:568
本文介绍了在Qt中应用像Chrome一样的选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伊万做到了 - 请参阅



你看,他们有Qt :: FramelessWindowHint,如下所述:

http://doc.qt.digia.com/4.5/qt.html#WindowType-enum



其余的是相当直接的。标签栏对我来说看起来相当规则,可能是您必须修改一些小部件属性(例如间距)。


Ivan made this -- see http://ivan.fomentgroup.org/blog/2009/03/29/instant-chrome/ -- but I don't know how since I am new to Qt. Does anyone have Idea how to achieve this?

解决方案

The first trick is that the window does not have window manager decorations. This is a hint you need to give to the window manager using the NetWM stuff. The good thing is that Qt exports that functionality for you:

http://doc.qt.digia.com/4.5/qwidget.html#windowFlags-prop

You see, they have the Qt::FramelessWindowHint, as explained here:

http://doc.qt.digia.com/4.5/qt.html#WindowType-enum

The rest is rather straight-forward. The tab-bar looks quite regular to me, it may be that you have to modify some widget properties (e.g. spacing).

这篇关于在Qt中应用像Chrome一样的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆