GUI runs with no errors but window doesn't appear

Question:

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


FlashCard()

There is no error but gui not appear....
Asked By: Hemford Jamera

||

Answers:

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

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

Answered By: Tyson Chicken
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.