Python QT Beispiel

import tkinter as tk
from tkinter import *
main=tk.Tk()
main.title=("Anleitungen erstellen")
def ohne_aenderung():
        print ("ohne Änderung")
def runde():
	print ("Runde ")
def reihe():
	print ("Reihe ")
def in_den_Maschenring():
                        print ("Runde 1: 6 fM in den Maschenring")
def zun_mal_6():
                        print ("Runde 2: Zun * 6")
button1=tk.Button(main, text="o.Ä", command=ohne_aenderung)
button1.pack()
button2=tk.Button(main, text="Runde", command=runde)
button2.pack()
button3=tk.Button(main, text="Reihe", command=reihe)
button3.pack()
button4=tk.Button(main,text="6 fM in Maschring" , command=in_den_Maschenring)
button4.pack()

main.mainloop()



Allerdings wird die Ausgabe dann im Terminal erfolgen. Um dies zu ändern wird der Code geändert und print durch update ersetzt

import tkinter as tk
from tkinter import *

# Main-Window
main = tk.Tk()
main.title("Anleitungen erstellen")

# Funktion, um Text in das Textfeld zu schreiben
def update_text(text):
    text_widget.insert(END, text )

# Buttons und deren Aktionen
def ohne_aenderung():
    update_text("ohne Änderung")

def runde():
    update_text("Runde")

def reihe():
    update_text("Reihe")

def in_den_Maschenring():
    update_text("Runde 1: 6 fM in den Maschenring")

def zun_mal_6():
    update_text("Runde 2: Zun * 6 = 12")
    
def fMZun():
	update_text("Runde 3: (1 fM, Zun) * 6 = 18")    
def zweifM():
	update_text("Runde 4: (2 fM, Zun) * 6 = 24")	
def loeschen():
    # Alle Zeilen holen
    lines = text_widget.get("1.0", END).splitlines()
    # Letzte Zeile löschen, wenn's noch was gibt
    if lines:
        text_widget.delete("end-2l", "end-1l")
# Text-Widget hinzufügen
text_widget = Text(main, height=10, width=50)
text_widget.pack()

# Buttons erstellen
button1 = tk.Button(main, text="o.Ä", command=ohne_aenderung)
button1.pack()
button2 = tk.Button(main, text="Runde", command=runde)
button2.pack()
button3 = tk.Button(main, text="Reihe", command=reihe)
button3.pack()
button4 = tk.Button(main, text="6 fM in Maschring", command=in_den_Maschenring)
button4.pack()
button5 = tk.Button(main, text="Löschen", command=loeschen)
button5.pack()
button6 = tk.Button(main, text="fM,Zun", command=fMZun)
button6.pack()
button7 = tk.Button(main, text="zweifM", command=zweifM)
button7.pack()
main.mainloop()