tkinter window will not pop up

Question:

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()

Asked By: Mathew Still

||

Answers:

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):
        ...
Answered By: Delrius Euphoria
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.