<legend id='mZFBt'><style id='mZFBt'><dir id='mZFBt'><q id='mZFBt'></q></dir></style></legend>

    1. <small id='mZFBt'></small><noframes id='mZFBt'>

        <bdo id='mZFBt'></bdo><ul id='mZFBt'></ul>
      <tfoot id='mZFBt'></tfoot>
    2. <i id='mZFBt'><tr id='mZFBt'><dt id='mZFBt'><q id='mZFBt'><span id='mZFBt'><b id='mZFBt'><form id='mZFBt'><ins id='mZFBt'></ins><ul id='mZFBt'></ul><sub id='mZFBt'></sub></form><legend id='mZFBt'></legend><bdo id='mZFBt'><pre id='mZFBt'><center id='mZFBt'></center></pre></bdo></b><th id='mZFBt'></th></span></q></dt></tr></i><div id='mZFBt'><tfoot id='mZFBt'></tfoot><dl id='mZFBt'><fieldset id='mZFBt'></fieldset></dl></div>

      如何在 Kivy 中拥有多个窗口?

      时间:2023-06-06
      <legend id='YWwhL'><style id='YWwhL'><dir id='YWwhL'><q id='YWwhL'></q></dir></style></legend>

      <small id='YWwhL'></small><noframes id='YWwhL'>

      1. <i id='YWwhL'><tr id='YWwhL'><dt id='YWwhL'><q id='YWwhL'><span id='YWwhL'><b id='YWwhL'><form id='YWwhL'><ins id='YWwhL'></ins><ul id='YWwhL'></ul><sub id='YWwhL'></sub></form><legend id='YWwhL'></legend><bdo id='YWwhL'><pre id='YWwhL'><center id='YWwhL'></center></pre></bdo></b><th id='YWwhL'></th></span></q></dt></tr></i><div id='YWwhL'><tfoot id='YWwhL'></tfoot><dl id='YWwhL'><fieldset id='YWwhL'></fieldset></dl></div>
              <tbody id='YWwhL'></tbody>
            1. <tfoot id='YWwhL'></tfoot>
                <bdo id='YWwhL'></bdo><ul id='YWwhL'></ul>
                本文介绍了如何在 Kivy 中拥有多个窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试从完全不同的 GUI 打开一个 GUI.我正在桌面上开发,并且窗口的大小彼此不同.我查看了屏幕管理器,但感觉好像有更简单的方法可以做到这一点.

                I am trying to open one GUI from a completely different GUI. I am developing on a desktop and the windows have different sizes from each other. I looked at screen manager but I feel as if there is an easier way to do this.

                提前致谢!

                推荐答案

                有可能,但有点不方便.问题是 kivy 每个应用程序仅支持一个窗口,因此您需要以某种方式解决它.我个人只是在一个窗口中使用多个 *Layouts(它们是具有不同功能的不同 GUI),并根据需要显示和隐藏它们.显然这种方法有其局限性,eg它不支持多显示器,但它很简单.

                It's possible, but kinda inconvenient. The issue is that kivy supports only one window per app, so you need to work around it somehow. I personally just use multiple *Layouts (which are different GUIs with different functions) in a single window, showing and hiding them as necessary. Obviously this approach has its restrictions, eg it doesn't support multiple monitors, but it's as simple as it gets.

                然后有一个问题 在这里,人们为每个窗口生成单独的 kivy 应用程序,从而获得可以相对拖动和调整大小的窗口.它需要一些子进程的摆弄和应用程序之间的通信,但这种方法更强大.

                Then there is a question here on SO where people spawn separate kivy apps for every window, thus getting windows that can be dragged and resized relatively. It requires some fiddling with subprocesses and communicating between apps, but this method is more powerful.

                据我所知,ScreenManager 对您没有帮助:它只允许为同一个窗口定义多个小部件树并在它们之间动态切换.这是触摸屏上的正常用例,但在桌面上几乎没有意义.老实说,这对于 kivy 中的很多事情都是正确的.如果你以后不打算转向手机,Tkinter 或 PyQT 可能是比 kivy 更好的选择.

                ScreenManager, as I understand, doesn't help you: it allows just to define multiple widget trees for the same window and switch between them on the fly. It's a normal use case on touchscreens, but makes pretty little sense on desktop. Which is true for quite a few things in kivy, to be honest. If you don't plan to move to mobiles later, Tkinter or PyQT may be a better choice than kivy.

                这篇关于如何在 Kivy 中拥有多个窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:用kivy按下按钮时如何更改空格? 下一篇:AttributeError:“MainRouter"对象没有属性“_disabled_count"

                相关文章

                <small id='1Jrvj'></small><noframes id='1Jrvj'>

              • <i id='1Jrvj'><tr id='1Jrvj'><dt id='1Jrvj'><q id='1Jrvj'><span id='1Jrvj'><b id='1Jrvj'><form id='1Jrvj'><ins id='1Jrvj'></ins><ul id='1Jrvj'></ul><sub id='1Jrvj'></sub></form><legend id='1Jrvj'></legend><bdo id='1Jrvj'><pre id='1Jrvj'><center id='1Jrvj'></center></pre></bdo></b><th id='1Jrvj'></th></span></q></dt></tr></i><div id='1Jrvj'><tfoot id='1Jrvj'></tfoot><dl id='1Jrvj'><fieldset id='1Jrvj'></fieldset></dl></div>
                  <bdo id='1Jrvj'></bdo><ul id='1Jrvj'></ul>

                  <legend id='1Jrvj'><style id='1Jrvj'><dir id='1Jrvj'><q id='1Jrvj'></q></dir></style></legend>

                  1. <tfoot id='1Jrvj'></tfoot>