views:

527

answers:

5

I generally make my desktop interfaces with Qt, but some recent TK screenshots convince me Tk isn't just ugly motif any more. Additionally Tkinter comes bundled with Python, which makes distribution easier.

So is it worth learning or should I stick with Qt?

example tk interface

+3  A: 

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.

Ignacio Vazquez-Abrams
+4  A: 

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. This particular one is where I learned it from and it has been quite infallible in serving me.

Hope this helps

inspectorG4dget
Tk is better, how?
Nick Presta
Tk uses the default system displays and this is quite apparent in most situations. Also, when you have multiple elements in a display (like a window for example), then Tk does the "administrative work" behind the scenes to make sure that all your elements are shown and fit within the window, which not too many other toolkits do for you
inspectorG4dget
It has been multiple months since I wrote this answer. Now the times have changed and I should note that easygui makes things a lot easier. It also allows for access to Tkinter if you really want to hack at Tkinter. I would suggest using easygui over Tkinter because it's easier to use.
inspectorG4dget
+2  A: 

You might want to take a look at 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

TheMachineCharmer
what does wx offer that qt doesn't? Anyway, my main motivation for tk is that it comes bundled with Python, which makes distribution easier for me.
Plumo
@Richard Nice comparison on http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits
TheMachineCharmer
any specifics? The only possible advantage I read was using native widgets, but Qt's appearance is fine for me. Downsides are wx looks harder to distribute, less commercial support, no equivalent to Qt Creator, no styling. Anyway, my purpose here is not to find a Python GUI library but decide whether to stick with Qt or try Tkinter.
Plumo
I can't agree with the "most mature" part of that equation. Tk is very, very mature, and arguably more robust than wxPython. I don't think I can recall the last time I saw a core dump in Tk. With wxPython it happens a lot during development.
Bryan Oakley
+2  A: 

Why not go for PyQT? You apparently are already familiar with Qt, so it should be relatively easy to learn. In my opinion it looks better than Tkinter, and it sure is better documented.

Ton van den Heuvel
I already use PyQt / PySide - question was about whether I should try Tkinter
Plumo
Sorry, that was not completely obvious from your question.
Ton van den Heuvel
+1  A: 

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.

Skilldrick
Tkinter comes with Python - idle uses it.
phkahler
Yes, but not always the latest version.
Skilldrick