python Tkinter 值得学习吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2361328/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is Tkinter worth learning?
提问by hoju
I generally make my desktop interfaces with Qt, but some recent TK screenshots convince me Tk isn't just ugly motif any more. Additionally Tkintercomes bundled with Python, which makes distribution easier.
我通常使用Qt制作我的桌面界面,但最近的一些 TK 屏幕截图使我相信 Tk 不再只是丑陋的主题。此外,Tkinter与 Python 捆绑在一起,这使得分发更容易。
So is it worth learning or should I stick with Qt?
那么值得学习还是我应该坚持使用 Qt?
(source: kb-creative.net)
(来源:kb-creative.net)
回答by inspectorG4dget
The answer to your question is a resounding yes.
你的问题的答案是肯定的。
Qt is good, I have nothing against it. But Tk is better and far easier to use and quite well documented- not just on the Python webspace, but there are also many third-party tutorials out there. Thisparticular one is where I learned it from and it has been quite infallible in serving me.
Qt 很好,我没有反对它。但是 Tk 更好、更容易使用并且有很好的文档记录- 不仅在 Python 网络空间上,而且还有许多第三方教程。这个特别的地方是我从那里学到的,它在为我服务方面非常可靠。
回答by Ignacio Vazquez-Abrams
As a step up to other GUI toolkits, sure. If you know other toolkits then you already understand TkInter and can leave it until you actually need it.
当然,作为向其他 GUI 工具包迈进的一步。如果您了解其他工具包,那么您已经了解了 TkInter 并且可以将其保留到您真正需要它为止。
回答by Pratik Deoghare
You might want to take a look at this(wxPython).
您可能想看看this(wxPython)。
wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first. -- Guido van Rossum
wxPython 是最好和最成熟的跨平台 GUI 工具包,但有很多限制。wxPython 不是标准 Python GUI 工具包的唯一原因是 Tkinter 首先出现。——吉多·范罗苏姆
回答by Ton van den Heuvel
回答by Skilldrick
I used Qt with C++, but decided to have a go with Tkinter with Python. I had a bit of trouble installing the latest version of Tcl/Tk, but got there eventually. I did it all with the help of this tkdocs.com tutorial, which is great.
我将 Qt 与 C++ 一起使用,但决定将 Tkinter 与 Python 一起使用。我在安装最新版本的 Tcl/Tk 时遇到了一些麻烦,但最终还是到了那里。我在这个 tkdocs.com 教程的帮助下完成了这一切,这很棒。