Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

GUI runs with no errors but window doesn't appear

Why i did not see my gui?

UI.py

from tkinter import *
BACKGROUND_COLOR = "#B1DDC6"
class FlashCard:
    def __int__(self):
        self.window = Tk()
        self.window.title("Flash Card")
        self.window.config(padx=50, pady=50, bg=BACKGROUND_COLOR)
        self.window.mainloop()

main.py
from UI import FlashCard

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel


FlashCard()

There is no error but gui not appear....

>Solution :

In the FlashCard class, you typed __int__ instead of __init__.

Change def __int__(self): to def __init__(self): and it should work.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading