【Kivy】GridLayout を利用し、表のように並べる

  • main.py
from kivy.app import App

class MainApp(App):
    pass

if __name__ == '__main__':
    MainApp().run()
  • main.kv
#:kivy 1.0
GridLayout:
    cols: 2
    Button:
        text: 'button 1'
    Button:
        text: 'button 2'
    Button:
        text: 'button 3'
    Button:
        text: 'button 4'