我刚刚学习python,我正在尝试使窗口变成全屏,这是我已经实现的,但我现在想要摆脱顶部的标题栏。它目前看起来像下面的图片,但我希望它也可以在顶部的Mac顶部工具栏(如启动画面)。如何在macOS上以全屏显示tkinter应用程序?
from tkinter import *
root = Tk()
root.attributes('-fullscreen', True)
root.attributes('-topmost', True)
root.overrideredirect(True)
def quitApp():
# mlabel = Label (root, text = 'Close').pack()
root.destroy()
# placing the button on my window
button = Button(text = 'QUIT', command = quitApp).pack()
有[overrideredirect](https://stackoverflow.com/questions/38162932/what-does-overrideredirect-do)方法,该方法的工作原理与Windows,但不知道如何/如果它在Mac上工作。 – Lafexlos
我试过,但没有做任何事情(也许我做错了) – BCLtd