久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='Lsqqu'></small><noframes id='Lsqqu'>

    <tfoot id='Lsqqu'></tfoot>

      • <bdo id='Lsqqu'></bdo><ul id='Lsqqu'></ul>

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

        正確使用 Kivy 的 .kv 文件并將它們導入 Python 腳本

        Properly using .kv Files for Kivy and importing them to your Python script(正確使用 Kivy 的 .kv 文件并將它們導入 Python 腳本)

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

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

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

                <tbody id='Tiip5'></tbody>
            1. <legend id='Tiip5'><style id='Tiip5'><dir id='Tiip5'><q id='Tiip5'></q></dir></style></legend>

                  本文介紹了正確使用 Kivy 的 .kv 文件并將它們導入 Python 腳本的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在關注

                  有誰知道我做錯了什么?這些是我對 /dev/input/event6

                  的權限

                  crwxrwxr-- 1 根輸入 13, 2011 年 9 月 70 日 23:47/dev/input/event6

                  非常感謝!

                  解決方案

                  根據

                  I am following tutorials for Kivy and I haven't been able to properly load properties from .kv files. For some reason, I am able to sometimes pull .kv files via a for kv in listdir(kv_path): Builder.load_file(kv_path+kv), but I can't do it by simply putting the kv files in the same root directory and letting it "import by itself?"

                  As an example, when using the files:
                  main.py

                  from kivy.app import App  
                  from kivy.uix.label import Label   
                  from kivy.uix.widget import Widget  
                  
                  class Widgets(Widget):
                      pass
                  class SimpleKivy3(App):
                      def build(self):
                          return Widgets()
                  
                  if __name__ == "__main__":
                      SimpleKivy3().run()
                  

                  SimpleKivy3.kv

                  <Button>:
                      font_size: 40
                      size: 170,75
                      color: 0,1,0,1
                  
                  <Widgets>:
                      Button:
                          pos: root.x, root.top - self.height
                          text: "Kivy"
                  
                      Button:
                          pos: 170,0
                          text: "Tutorials"
                  

                  I obtain the following output on my Terminal:

                  $ python main.py 
                  [INFO   ] [Logger      ] Record log in /home/nickshu/.kivy/logs/kivy_18-09-12_58.txt
                  [INFO   ] [Kivy        ] v1.11.0.dev0, git-038acbf, 20180912
                  [INFO   ] [Python      ] v3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
                  [GCC 7.2.0]
                  [INFO   ] [Factory     ] 195 symbols loaded
                  [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
                  [INFO   ] [Text        ] Provider: sdl2
                  [INFO   ] [Window      ] Provider: sdl2(['window_egl_rpi'] ignored)
                  [INFO   ] [GL          ] Using the "OpenGL" graphics system
                  [INFO   ] [GL          ] Backend used <gl>
                  [INFO   ] [GL          ] OpenGL version <b'3.0 Mesa 18.0.5'>
                  [INFO   ] [GL          ] OpenGL vendor <b'Intel Open Source Technology Center'>
                  [INFO   ] [GL          ] OpenGL renderer <b'Mesa DRI Intel(R) HD Graphics P630 (Kaby Lake GT2) '>
                  [INFO   ] [GL          ] OpenGL parsed version: 3, 0
                  [INFO   ] [GL          ] Shading version <b'1.30'>
                  [INFO   ] [GL          ] Texture max size <16384>
                  [INFO   ] [GL          ] Texture max units <32>
                  [INFO   ] [Window      ] auto add sdl2 input provider
                  [INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
                  [INFO   ] [ProbeSysfs  ] device match: /dev/input/event6
                  [INFO   ] [MTD         ] Read event from </dev/input/event6>
                  [INFO   ] [Base        ] Start application main loop
                  [INFO   ] [MTD         ] </dev/input/event6> range position X is 1266 - 5676
                  [INFO   ] [MTD         ] </dev/input/event6> range position Y is 1094 - 4762
                  [INFO   ] [MTD         ] </dev/input/event6> range touch major is 0 - 0
                  [INFO   ] [MTD         ] </dev/input/event6> range touch minor is 0 - 0
                  [INFO   ] [MTD         ] </dev/input/event6> range pressure is 0 - 255
                  [INFO   ] [MTD         ] </dev/input/event6> axes invertion: X is 0, Y is 0
                  [INFO   ] [MTD         ] </dev/input/event6> rotation set to 0
                  

                  The following window shows!

                  Does anyone know what am I doing wrong? These are my permissions for /dev/input/event6

                  crwxrwxr-- 1 root input 13, 70 Sep 11 23:47 /dev/input/event6

                  Thank you very much!

                  解決方案

                  According to the docs you have 2 possibilities:

                  1.

                  By name convention:

                  Kivy looks for a Kv file with the same name as your App class in lowercase, minus "App" if it ends with ‘App’ e.g:

                  MyApp -> my.kv

                  If this file defines a Root Widget it will be attached to the App’s root attribute and used as the base of the application widget tree.

                  So you must change the name of the .kv to lowercase, and change the name of class App to end in App:

                  simplekivy3.kv

                  <Button>:
                      font_size: 40
                      size: 170,75
                      color: 0,1,0,1
                  
                  <Widgets>:
                      Button:
                          pos: root.x, root.top - self.height
                          text: "Kivy"
                  
                      Button:
                          pos: 170,0
                          text: "Tutorials"
                  

                  *.py

                  from kivy.app import App  
                  from kivy.uix.widget import Widget  
                  
                  class Widgets(Widget):
                      pass
                  
                  class SimpleKivy3App(App):
                      def build(self):
                          return Widgets()
                  
                  if __name__ == "__main__":
                      SimpleKivy3App().run()
                  


                  2.

                  Builder: You can tell Kivy to directly load a string or a file. If this string or file defines a root widget, it will be returned by the method:

                  Builder.load_file('path/to/file.kv')

                  from kivy.app import App   
                  from kivy.uix.widget import Widget  
                  from kivy.lang import Builder
                  
                  
                  class Widgets(Widget):
                      pass
                  
                  Builder.load_file('SimpleKivy3.kv')
                  
                  
                  class SimpleKivy3(App):
                      def build(self):
                          return Widgets()
                  
                  
                  if __name__ == "__main__":
                      SimpleKivy3().run()
                  

                  這篇關于正確使用 Kivy 的 .kv 文件并將它們導入 Python 腳本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                  <tfoot id='M4Gfy'></tfoot>

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

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

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

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

                          <tbody id='M4Gfy'></tbody>
                          • 主站蜘蛛池模板: 亚洲一区免费视频 | 国产精品99久久久久久久久久久久 | 国产在线高清 | 久久免费精品视频 | 91亚洲精华国产 | 91久久久久 | 日韩免费视频一区二区 | 色欧美综合 | 国产一区二区三区 | 国产欧美精品一区二区色综合朱莉 | 欧美一二区 | 亚洲综合在线视频 | 青青草久久 | 国产一区二区三区高清 | 欧美aⅴ | 午夜亚洲 | 精品久久久一区 | 欧美一级欧美一级在线播放 | 在线激情视频 | 精品国产一区二区三区在线观看 | 一区二区三区视频 | 日日摸日日碰夜夜爽亚洲精品蜜乳 | 日韩欧美中文字幕在线视频 | 亚洲一区视频在线 | 成人三区 | 成人在线不卡 | 91国内精品久久 | 91看国产 | 久久久久国产一区二区三区 | 亚洲成人免费视频在线观看 | 成人午夜看片 | 日韩在线观看一区二区三区 | 成人精品免费视频 | 国产视频一区二区 | 日韩精品视频在线免费观看 | 中文字幕日韩欧美一区二区三区 | 久久久久av | 97精品国产| 欧美日韩手机在线观看 | 亚洲精品免费在线观看 | 久在线视频 |