python - How to load an image in kivy? -
my code:
.py file:
class picture(image):     pass  class blablabla(hatwidget):     ...     self.add_widget(picture(sourse='paper.png')) .kv file:
<picture>:     canvas:         color:             rgb: (1, 1, 1)         rectangle:             texture: self.texture             size: self.size             pos: self.pos but thing have white screen
i'm pretty sure image property set image source not sourse.
also, you'll want remove base rule if want display image yourself.
<-picture>
the "-" tell kv drop rule inherited image.
Comments
Post a Comment