Kivy Tutorial #4 - The kv Design Language (.kv file tutorial)

Tech With Tim · 262K views · 2019 · 11:28

Open on YouTube

Python, Ruby & scripting languagesUX & UI designtutorial

Why Stack Overflow recommends it

Stack Overflow users link it as a beginner reference for how Kivy loads .kv files and as the source tutorial they are following when they ask Kivy questions.

Recommended by 0 people across 0 different months, 2020 to 2022.

What it is

Part four of Tech With Tim's Kivy series for Python, introducing the kv design language. It shows how to describe widgets and layout in a separate .kv file while keeping the logic in the Python script. The video is a screen-recorded coding walkthrough with a matching written tutorial.

What people said

Cites Vedant Matanhelia · 2020-09 · Stack Overflow · on “First character not getting printed in kivy”

for reference to the fact the it gets printed in the videoseries that I am learning from here is the link [this video]

Cites Fruit · 2020-11 · Stack Overflow · on “Convert .kv class to .py class”

Kivy module will read and parse the *.kv file automatically if the *.kv file name matches your app class name. Example 1: if your app class is like this: class MyApp(App): pass The *.kv file that kivy module will be looing for: my.kv Example 2: if your app class is like this: class SomeApp(App): pass The *.kv file that kivy module will be looing for: some.kv Here [this video] is a nice tutorial video that you can watch.

Cites James Ngo · 2022-02 · Stack Overflow · on “Error when using GridLayout class in kivy for python window”

Hello I'm learning kivy on python, window 11 Whenever I use GridLayout in "pnn.kv" file, I have this error "AssertionError" For my code: I'm learning from this tutorial " [this video] " Written version from the tutorial: "main.py" file from kivy.app import App from kivy.uix.widget import Widget class Layout(Widget): pass class PnnApp(App): def build(self): return Layout() if __name__ == "__main__": PnnApp().run() "pnn.kv" file: <Layout> GridLayout: cols: 1 size: root.width, root.height GridLayout: cols: 2 Label: text: "First Name: " TextInput: multiline: False Label: text: "Last Name: " TextInput: multiline: False Label: text: "Phone number: " TextInput: multiline: False Button: text: "Login" Tha