Can't Close Kivy App Or Avoid Fullscreen
I am new to Kivy and trying to find my way around. Whenever I create and run an app, it displays as a full-screen that I am unable to close without disconnecting the power (which I
Solution 1:
As a temporary workaround you could just do :
defbuild(self):
button = Button(text = 'Exit', size_hint = (.1, .05),
pos_hint = {'x':0, 'y':0})
button.bind(on_press = self.on_quit)
self.layout = FloatLayout()
self.layout.add_widget(button)
returnself.layout
defon_quit(self):
exit()
Which would provide you with an exit button. For your fullscreen problem it's weird, can you provide some more code ?
EDIT:
Can you try this ? :
from kivy.config import Config
Config.set('graphics', 'borderless', 0)
Config.write()
Solution 2:
To work around this issue, you can change the full screen to fake so kivy can exit on Ctrl+C.
from kivy.config import Config
Config.set('graphics', 'fullscreen', 'fake')
Config.write()
Also, try to run the code in command line prompt. Avoid raspberry pi's desktop environment while running kivy apps. This will free up pi's memory for running kivy.
Post a Comment for "Can't Close Kivy App Or Avoid Fullscreen"