简体   繁体   English

如何修复 kivy 中的“无效属性名称”

[英]How to fix 'Invalid Property Name ' in kivy

in line 7 it throws the error:在第 7 行,它抛出错误:

:kivy 1.0.9 :kivy 1.0.9

: orientation: 'vertical' spacing: 10 :方向:'垂直'间距:10

BoxLayout:
    size_hint_y= None
    height: 50
    Label:
        text: 'Account Control'
        bold: True
        size_hint_x=.9
    Button:
         text: 'x'
         size_hint_x= 1

6: BoxLayout: 6:BoxLayout:

7: size_hint_y= None 8: height: 50 9: Label: ... Invalid property name 7: size_hint_y= None 8: height: 50 9: 标签: ...无效的属性名称

This usually indicates a syntax error messing up the property name parsing.这通常表示语法错误搞乱了属性名称解析。 In this case, your error is on the line you picked out: size_hint_x= 1 should be size_hint_x: 1 .在这种情况下,您的错误就在您选择的行上: size_hint_x= 1应该是size_hint_x: 1

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

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