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

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

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

        是否可以在 Kivy 应用程序中读取多个 .kv 文件?

        Is it possible to read from more than one .kv file in Kivy app?(是否可以在 Kivy 应用程序中读取多个 .kv 文件?)
          <bdo id='uKVDg'></bdo><ul id='uKVDg'></ul>
            <tbody id='uKVDg'></tbody>

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

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

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

                  <i id='uKVDg'><tr id='uKVDg'><dt id='uKVDg'><q id='uKVDg'><span id='uKVDg'><b id='uKVDg'><form id='uKVDg'><ins id='uKVDg'></ins><ul id='uKVDg'></ul><sub id='uKVDg'></sub></form><legend id='uKVDg'></legend><bdo id='uKVDg'><pre id='uKVDg'><center id='uKVDg'></center></pre></bdo></b><th id='uKVDg'></th></span></q></dt></tr></i><div id='uKVDg'><tfoot id='uKVDg'></tfoot><dl id='uKVDg'><fieldset id='uKVDg'></fieldset></dl></div>
                  本文介绍了是否可以在 Kivy 应用程序中读取多个 .kv 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道简短的回答可能是不",但也许这值得再问一次.

                  I realize the short answer may be 'no,' but perhaps this is worth asking again.

                  如果我知道一个有几千行的 Kivy 应用程序 - 那么是否可以在另一个 kv 文件中编写一些类?

                  If I am witting a Kivy app with a couple thousand of lines - then would it be possible to write some classes in another kv file?

                  这将使编辑、更正错误、进行更改...等变得更加容易.

                  This would make it so much easier to edit, correct errors, make changes... etc.

                  澄清一下 - .KV 文件将是彼此的延续 - 不指向并行应用程序.

                  Just to clarify - the .KV files would be a continuation of each other - not pointing to a parallel app.

                  我们将不胜感激一些专家的见解 - 谢谢.

                  Some expert insight would be greatly appreciated - Thank you.

                  推荐答案

                  是的!您可以像普通的 python 文件一样在文件中导入 .kv 文件,方法是:

                  Yes it is! You can import .kv files inside files just like normal python files by starting with:

                  #:include otherfile.kv
                  

                  如果您希望文件先卸载并重新加载,您可以强制导入输入

                  If you want the file to unload and reload first you can force the import typing

                  #:include force otherfile.kv
                  

                  相反.

                  所有这些都写在 Kivy 语言文档中,其中充满了有用澄清.

                  All this as written in the Kivy Language Documentation which is full of useful clarifications.

                  这篇关于是否可以在 Kivy 应用程序中读取多个 .kv 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Kivy 1.9.0 Windows package KeyError: #39;rthooks#39;(Kivy 1.9.0 Windows 包 KeyError: rthooks)
                  Python Kivy: how to call a function on button click?(Python Kivy:如何在按钮单击时调用函数?)
                  How to disable a widget in Kivy?(如何禁用 Kivy 中的小部件?)
                  Centering an object in Kivy(在 Kivy 中将对象居中)
                  How to downgrade to Python 3.4 from 3.5(如何从 Python 3.5 降级到 Python 3.4)
                  Change button or label text color in kivy(在kivy中更改按钮或标签文本颜色)

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

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

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