简体   繁体   English

黑色的空窗户奇维

[英]Black empty window Kivy

I made GUI for my program. 我为程序制作了GUI。 When I launch app, then it appears empty black screen. 当我启动应用程序时,它会出现黑屏。

This isn't completed program, but I expect a working application. 该程序尚未完成,但是我希望该程序可以正常工作。

Python code: http://pastebin.com/RbMKAd9t Python程式码: http//pastebin.com/RbMKAd9t
Kivy interface: http://pastebin.com/12eHp0y4 Kivy界面: http//pastebin.com/12eHp0y4

空白视窗

I infer that your kv file is called interface.kv, and you load it only with Builder.load_string. 我推断您的kv文件称为interface.kv,而您仅使用Builder.load_string加载它。 In this case the problem is that Builder.load_string doesn't return anything because there is no root widget definition (ie without the <>) in the file. 在这种情况下,问题是Builder.load_string不返回任何内容,因为文件中没有根窗口小部件定义(即,没有<>)。

Add a root widget definition, or change the build method to return Main() . 添加一个根窗口小部件定义,或将构建方法更改为return Main()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM