Answers for "adding an image in kivy"

0

adding an image in kivy

from kivy.app import App
from kivy.uix.image import Image

class MainApp(App):
    def build(self):
        img = Image(source='/path/to/real_python.png',
                    size_hint=(1, .5),
                    pos_hint={'center_x':.5, 'center_y':.5})

        return img

if __name__ == '__main__':
    app = MainApp()
    app.run()
Posted by: Guest on September-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language