Tkinter的GUI应用程序有问题。我不明白为什么我可以打开另一扇窗。 当用户名和密码正常时,connexion窗口将打开其他窗口,但窗口从不显示
我想这是因为我使用了两个tk实例,但是今天早上它的工作非常好
这里是连接窗口的一些代码行
# init the windows
global app
app = Connexion()
app.title("Se connecter")
app.mainloop()
# calling the other windows
Acceuil.appel_affichage_accueil(id_utilisateur)
global app
app.quit()
其他窗口的初始化
def appel_affichage_accueil(IDUtilisateurEnvoye):
"""
On va afficher un message d'alerte dans la fenetre d'alerte
la variable afficher correspont auIdUtilisateur message que l'on souhaite faire apparaitre
"""
global Idutilisateur
Idutilisateur = IDUtilisateurEnvoye
AffichageAcceuil()
class AffichageAcceuil(tk.Tk):
# ligne de code qui se lance lorsque de l'initialisation
def __init__(self):
tk.Tk.__init__(self)
我找到了解决办法:
用
app.destroy()
替换app.quit()
相关问题 更多 >
编程相关推荐