简体   繁体   English

如何在最右侧的标题栏中添加“全屏”按钮?

[英]How to add the “full screen” button to the title bar on the far right hand side?

Most Mac applications, including third party ones such as Chrome Browser come with the "Full Screen" icon, placed on the far right side of the title bar. 大多数Mac应用程序(包括第三方应用程序,例如Chrome浏览器)都带有“全屏”图标,位于标题栏的最右侧。

I would like to do the same thing. 我想做同样的事情。

I've done some research but I can not find how to show/hide this button or how to modify the titlebar itself. 我已经做过一些研究,但是找不到如何显示/隐藏此按钮或如何修改标题栏本身。

Is it not possible? 不可能吗 Would I need a complete custom titlebar for this? 我需要一个完整的自定义标题栏吗? I don't want to do that to not to lose default window manager's perks. 我不想那样做,以免丢失默认窗口管理器的特权。

Thank you 谢谢

Check out what the Qt Project has to say about 看看Qt项目要说些什么
How to handle events in the titlebar and change its color etc? 如何处理标题栏中的事件并更改其颜色等?

The titlebar belongs to the OS and we don't have control over that one. 标题栏属于操作系统,我们无法控制该标题栏。 You can create your own titlebar, but note that this requires some work. 您可以创建自己的标题栏,但是请注意,这需要一些工作。 In order to create your own titlebar then make a QWidget [doc.qt.nokia.com] subclass that contains three toolbuttons that handle the close, minimize and maximize events in addition to the moving of the window. 为了创建自己的标题栏,请创建一个QWidget [doc.qt.nokia.com]子类,该子类包含三个工具按钮,这些按钮不仅可以移动窗口,而且可以处理关闭,最小化和最大化事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从屏幕右侧而不是 C 中通常的左侧按 output 进行打印? - How to print by output from the right hand side of the screen instead of the usual left hand side in C? 如何在窗口标题栏中添加一个额外的按钮,这样它将作为标准工作? - How to add an extra button to the window title bar, so it will be work as standard? 如何在Qt上的应用标题栏上添加带有上下文菜单的按钮? - How to add a Button with context menu on my app title bar on Qt? 如何在左右两侧创建运算符*(double)以进行相乘? - How to create operator*(double) for multiplying on both the left and right hand side? 如何在 rtl 对齐中打开右侧的子菜单? - How to open sub-menu on right hand side in rtl alignments? 如何在Qt诺基亚屏幕底部的栏上添加一个按钮? - How can I add a button on the bar at the bottom of the screen for Qt Nokia? 从右手到左手如何使用substr? 如何将每8个字符从字符串转换为int? - How to use substr from right hand side to left hand side? How to convert each 8 characters from a string to an int? 问:如何在状态栏中添加两个小部件(比如说QPushButton),一个在左边,另一个在右边? - Qt: How to add two widgets (say QPushButton) to the status bar, one to the left and other to the right side? C ++容器和右侧 - C++ Containers and right hand side 在标题栏添加按钮 - Adding a button to the title bar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM