Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1585

Python • Rasp Pi / Tkinter / iconphoto not working

$
0
0
I will use a Pi 5 to run a Python application with a tkinter GUI. The GUI includes an icon being displayed on the windows.

I developed most of the application on W10 PC; running the application on the Pi 5 works very well. That is, with the exception of the icon (.png) i created: it simply does not show up. Not "my" icon, but neither the default tkinter icon. No error or warning is displayed; displaying the icon in a label is fine (so, there is nothing wrong with the png file).
I ran the application also on a Unix / Zorin distro; same problem.

There a few entries with keyword tk.iconphoto() in this forum, one of them suggesting Wayland may not yet support it. I reverted to X11 but that does not change the outcome.
The Pi Os: Debian GNU/Linux 12 (bookworm), out_of_the_box, kept current on updates.

Question:
- anybody running Pi Python tkinter WITH its icon showing up (it would appear strange to me that the brand's icon not showing up on any distro would be "tolerated");
- anybody successful in running the tkinter iconphoto() method to get a private icon displayed in a window title_bar?

Statistics: Posted by Flipje1955 — Tue Jun 03, 2025 12:25 pm



Viewing all articles
Browse latest Browse all 1585

Trending Articles