Mathew Still
Mathew Still

Reputation: 39

tkinter window will not pop up

I am doing a project with tkinter. I've recently switched to linux Mint on my computer. The program runs fine with no errors, the gui just won't come up. I'm using pycharm.

import sys
from tkinter import *

THEME_COLOR = "#375362"

class QuizInterface:
    def __int__(self):
        self.window = Tk()
        self.window.title("Quizzler")
        self.window.config(padx=30, pady=30)

        self.card = Canvas(width=300, height=250)
        self.card.create_text(text="Question goes here", font=("arial", 20, "italic"))
        self.card.grid(row=1, column=0, columnspan=2)


        self.score = Label(text="Score: ", font=("arial", 13, "bold"))
        self.score.grid(row=0, column=1)

        true_image = PhotoImage(file="images/true.png")
        self.true_button = Button(image=true_image, highlightthickness=0)

        false_image = PhotoImage(file="images/false.png")
        self.f_button = Button(image=false_image, highlightthickness=0)

        self.window.mainloop()

Upvotes: 0

Views: 102

Answers (1)

Delrius Euphoria
Delrius Euphoria

Reputation: 15098

One of the function that gets called when a class is intitialized is __init__, but you are defining def __int__(self):, so:

class QuizInterface:
    def __init__(self):
        ...

Upvotes: 2

Related Questions