Apply chrome like tabs in Qt

南楼画角 提交于 2019-12-21 02:28:38

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/4700829/apply-chrome-like-tabs-in-qt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!