Why isn't .ico file defined when setting window's icon?

前端 未结 12 1574
一整个雨季
一整个雨季 2020-11-27 15:47

When I tried to change the window icon in the top left corner from the ugly red \"TK\" to my own favicon using the code below, Python threw an error:

from tk         


        
12条回答
  •  甜味超标
    2020-11-27 16:08

    I recently ran into this problem and didn't find any of the answers very relevant so I decided to make a SO account for this.

    Solution 1: Convert your .ico File online there are a lot of site out there

    Solution 2: Convert .ico File in photoshop

    If you or your Editor just renamed your image file to *.ico then it is not going to work.
    If you see the image icon from your Windows/OS folder then it is working

提交回复
热议问题