How to change/switch windows using Gtk.Application Gtk+3 Glade Python?

烂漫一生 提交于 2019-12-25 12:38:26

问题


I read this tutorial- https://python-gtk-3-tutorial.readthedocs.io/en/latest/application.html

It says in the first para -

Gtk.Application encompasses many repetitive tasks that a modern application needs such as handling multiple instances, D-Bus activation, opening files, command line parsing, startup/shutdown, menu management, window management, and more.

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.


回答1:


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

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

Some of these features can be used for other purposes, but most GtkApplication features only are useful for advanced programming requirements.



来源:https://stackoverflow.com/questions/48135506/how-to-change-switch-windows-using-gtk-application-gtk3-glade-python

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