I'm new to programming and trying to use Kivy to create a simple game.
I am following a tutorial, and I'm using VSCode, but I can't understand why the code I write in the .kv
file doesn't is used by the main.py
file.
I have two files in the directory.
- main.py
from kivy.app import App
from kivy.uix.widget import Widget
class MainWidget(Widget):
pass
class TheLabApp(App):
pass
TheLabApp().run()
- thelab.kv
MainWidget:
<MainWidget>:
Button:
text: 'Hello'
size: 400, 200
I have installed a Kivy extension, and of course the Kivy module. But when I run the code the only thing that appears is a black screen, without the button. What is happening?