r/kivy•
sander314

how to refer to resources in a package in a kv file?

If I have package:

* myapp/__main__.py (which Builder.load( ... some importlib find of gui.kv .. )

  • myapp/gui.kv
  • myapp/img/blah.png

And in my kv file I have:

  • source: 'img/blah.png'

It doesn't find the image, presumably since it's looking in the path where the app is running.

​

*edit* : solved by using kivy.resources.resource_add_path

​

Posted May 13, 2020, 12:40 PM UTC · edited

30

No comments yet

Nobody commented on this post, or the comments weren't captured.