与注释中提到的@ el3ien一样,在.kv文件中,“Widgets”元素不应该包含括号。没有角度括号的元素是根元素,构造函数返回根元素。没有创建窗口,因为构建/构建器函数没有返回根
可以只有一个根元素。除非你表示根元素
return RootClassName()in build function from the python file, Python won't know which is root from the .kv file if all elements have angled brackets around it.