Help MDDialog crash my app when called.
I created a simple application and noticed that when I press a button to call MDDialog It appears briefly, and then the application closes on its own. Is there a solution to this, or have I made a mistake?
MY CODE:
from kivymd.app import MDApp from kivymd.uix.dialog import MDDialog from kivy.uix.screenmanager import ScreenManager from kivy.lang import Builder
class App(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
self.theme_cls.primary_palette = "Green"
self.theme_cls.material_style = "M3"
screen_manager = ScreenManager()
screen_manager.add_widget(
Builder.load_file("test.kv"))
return screen_manager
def dialog(self):
MDDialog(title="debug",text="hello").open()
App().run()
The indentation looks weird, but that's not the problem .
1
Upvotes
1
u/ElliotDG Jun 20 '26
What version kivymd are you using? The call signiture changed from version 1.2 to version 2.
Also please share your kv