• <tfoot id='QrmG1'></tfoot>

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

          <bdo id='QrmG1'></bdo><ul id='QrmG1'></ul>

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

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

        时间:2023-10-08
          <bdo id='HwwOG'></bdo><ul id='HwwOG'></ul>

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

              <legend id='HwwOG'><style id='HwwOG'><dir id='HwwOG'><q id='HwwOG'></q></dir></style></legend>
                <tbody id='HwwOG'></tbody>
                  本文介绍了如何在 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 中拥有多个窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                  相关文章

                  最新文章

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

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