Tkinter: Trying to create a quiz. Stuck on how to get a new question once the first one has been answered.

Tell me something, how is this not obvious? It's to obvious to be you're issue right?:

def newWindow_varningsmarken(self):
    self.newWindow = tk.Toplevel(self.master)
    self.app = QuizWindow_varningsmarken(self.newWindow)

This code does not work so i cannot test it, but this:

def correctAnswer(self):
    correctLabel = tk.Label(self.frame, text = 'Rätt svar!')
    correctLabel.pack()

packs a new label, in the same frame has:

    self.frame = tk.Frame(self.master)
    self.frame.pack()

Which is a frame that seems to be a frame placed over you're label/photo:

    self.photo = tk.PhotoImage(file=question)
    self.quizImage = tk.Label(self.master, image=self.photo)
    self.quizImage.pack()

Then the rest is extremely hard coded buttons, and.. that's about all i see.

Please send all the code for your script to work next time, also if you are having issues its faster to quarantine your code then google search. Don't google search until you removed anything useless, like this is what you're code could look like for example:

import tkinter as tk


class StartWindow():

    def __init__(self, master):
        self.master = master
        self.frame = tk.Frame(self.master)
        self.frame.pack()

        self.button1 = tk.Button(self.frame, 
                                text = 'Varningsmärken!', 
                                width = 25, 
                                fg = 'black', 
                                command = self.newWindow_varningsmarken)

        self.button1.pack()


    def newWindow_varningsmarken(self): # this is all that opens a new window
                                                                  # nothing else in this quarantine did!
                                                                  # ^  example thinking, i don't know that 
                                                                  #      since i din't have working code to begin with.
        self.newWindow = tk.Toplevel(self.master)
        self.app = QuizWindow_varningsmarken(self.newWindow)


class QuizWindow_varningsmarken():

    def __init__(self, master):
        self.master = master
        self.frame = tk.Frame(self.master)
        self.frame.pack()

        #self.photo = tk.PhotoImage(file=test_image)
        #self.quizImage = tk.Label(self.master, image=self.photo)
        #self.quizImage.pack()

        self.button1 = tk.Button(self.frame, 
                                 text = 'test', 
                                 fg = 'black', 
                                 command=self.correctAnswer)

        self.button1.pack()


    def correctAnswer(self):
        correctLabel = tk.Label(self.frame, text = 'Rätt svar!')
        correctLabel.pack()


    def incorrectAnswer(self):
        incorrectLabel = tk.Label(self.frame, text = 'Fel svar!')
        incorrectLabel.pack()

if __name__ == '__main__':
    root = tk.Tk()
    app = StartWindow(root)
    root.mainloop()

Now hopefully you understand why you're making a new window!... but it seriously looks like this was meant to be there so if not reply and give us a working file, either way, good luck.

/r/learnpython Thread