问题描述
我阅读了本教程 -
I read this tutorial-https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html
它在第一段说 -
如何使用Gtk.Application来启动/关闭,窗口管理和菜单管理?我找不到任何教程,示例或API文档。任何人都可以建议如何做到这一点?我正在使用Python 2.7.14和Pygobject(pygi-aio-3.24.1_rev1-setup)。感谢提前。
How do I do startup/shutdown, window management and menu management using Gtk.Application? I could not find any tutorials, examples or API documentation. Can anyone suggest how to do this? I am using Python 2.7.14 and Pygobject(pygi-aio-3.24.1_rev1-setup). Thank in Advance.
推荐答案
启动/关闭意味着启动或关闭应用程序。这使得通过双击通常在所述应用中使用的文件来启动您的应用变得更容易。
startup/shutdown means to start or shut down the app. Which makes it easier to launch your app by double clicking a file that would normally be used in said app. Simple example
菜单管理这可以为您的GtkApplication中的所有窗口创建全局相同的菜单。它也可以使Mac菜单更容易。由于它看起来像你使用Windows,这不会真的帮助你。
menu management This can create a global, identical menu for all windows within your GtkApplication. It can also make Mac menus easier. Since it looks like you are using Windows, this won't really help you. docs
窗口管理您可以控制和监视哪些窗口已打开或正在使用,然后在您的应用下次启动时重新打开这些窗口。
window management You can control and monitor which windows are opened or being used, and then reopen those windows next time your app is launched. docs
其中一些功能可用于其他目的,但大多数GtkApplication功能仅适用于高级编程要求。
Some of these features can be used for other purposes, but most GtkApplication features only are useful for advanced programming requirements.
这篇关于如何使用Gtk.Application Gtk + 3 Glade Python更改/切换窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!