Python Forum
[Kivy] Blank Screen - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: [Kivy] Blank Screen (/thread-17257.html)



Blank Screen - Exsul - Apr-04-2019

No error message, but I get a plain black window when I run this code:

practice1.py
import kivy
kivy.require("1.10.1")

from kivy.app import App
from kivy.uix.gridlayout import GridLayout

class GridLayoutApp(App):

    def build(self):
        return GridLayout()

glApp = GridLayoutApp()
glApp.run()
customwidget.kv
<GridLayout>:
    cols: 2
    rows: 2
    spacing: 10
    padding: 10

    Button:
        text: "1st"
        size_hint_x: None
        width: 200
    Button:
        text: "2nd"
    Button:
        text: "3rd"
        size_hint_x: None
        width: 200
    Button:
        text: "4th"



RE: Blank Screen - j.crater - Apr-04-2019

I didn't run your code, but I am concerned about naming your app and widgets GridLayout - same as the Kivy grid object.
Another thing is naming of Kivy resource file (.kv) and .py.
Try to rename GridLayoutApp(App) class to customwidgetApp. Example here:
https://kivy.org/doc/stable/examples/gen__application__app_with_kv__py.html


RE: Blank Screen - raajkumar - Sep-30-2019

Hello iam getting the same issue kindly help me fix it.