【发布时间】:2021-10-08 07:09:09
【问题描述】:
我试用了this ttk theme,它使用了svg 图像。但它说不支持图像文件格式svg。
在这一行:
root.tk.call('source','./DATA/themes/sun-valley-dark.tcl')
出现此错误:
Traceback (most recent call last):
File "guitesting.py", line 141, in <module>
root.tk.call('source','./DATA/themes/sun-valley-dark.tcl')
_tkinter.TclError: image file format "svg" is not supported
有用的信息:
OS: Windows 7
Python: Python 3.8.10
Architecture: x86 (32-bit)
Tkinter version: 8.6
【问题讨论】:
-
正如错误所说,tkinter 不支持
svg格式。 -
那么我该如何使用这个主题?
-
我不知道你是从哪里得到这个主题的,但是当我搜索它时,我找到了github.com/rdbende/Sun-Valley-ttk-theme,它使用 PNG 文件并且对我来说很好。
-
那么我可以通过任何方式使用这个主题吗?
标签: python tkinter svg themes ttk