Why my tkinter app shows Tk or Toplevel when i stop with mouse over the icon?
The correct solution in my case was to add a className parameter like this
root = tk.Tk(className="My App")
But because I am using my own class I had also to pass the className to the superclass
root = MyClass(className="My App")root.mainloop()class MyClass(tk.Tk):def __init__(self, className): super().__init__(className=className)
Thanks to everyone
If setting the title doesn't work, try using the wm_iconname()
method of the tkinter.Tk
object.
In [1]: import tkinter as tkIn [2]: root = tk.Tk()Out[2]: <tkinter.Tk object .>In [3]: root.wm_iconname?Signature: root.wm_iconname(newName=None)Docstring:Set the name of the icon for this widget. Return the name ifNone is given.File: /usr/local/lib/python3.7/tkinter/__init__.pyType: method