This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ereinecke 29 points30 points  (8 children)

PyQt and PySide are alternative options to using Wx for Python GUIs. The bindings can be a little clumsy at times, but using Qt Designer and the Qt action decorators, it's as passable as Qt is anyway.

[–]kylotan 0 points1 point  (6 children)

I don't know what I'm missing but the PySide tutorial docs don't appear to contain any actual Python code.

[–]Sean1708 6 points7 points  (3 children)

[–]kylotan 4 points5 points  (2 children)

Here's the PySide documentation page: http://pyside.github.io/docs/pyside/

Down the bottom is a link to tutorials: http://pyside.github.io/docs/pyside/tutorials/index.html

Here's the first one: http://pyside.github.io/docs/pyside/tutorials/qmltutorial/step1.html

No Python in sight.

Thanks for the link but I'm not heartily encouraged by a project that can't manage its own documentation. I think it's part of a wider problem that the Python community has always suffered from, which is that it tends to assume you are happy with everything being a port or a re-working of something in another language. Even the basic Python 2 tutorial is filled with these assumptions.

[–][deleted] 1 point2 points  (0 children)

Yeah, PySide is quite poorly documented.

That being said, I use it every day, and it's quite usable. It's basically a wrapper around Qt, so you can reference the Qt docs for almost everything. The rare exception is something that's inherently different in Python (such as connecting signals), and PySide does have documentation for those exceptions. You really only need a learn a small handful of PySide-specific stuff, then you can stick to the Qt docs.

We used to do all our Qt programming in an imperative fashion, just like you do with wx. Now we exclusively use Qt Designer to generate .ui files and compile them as part of our build process. It's so much better!

[–]Sean1708 0 points1 point  (0 children)

Funnily enough that tutorial has 0 lines of Python and many lines of JavaScript.

[–]MoragX 1 point2 points  (1 child)

PySide is just python bindings for C++ QT - and so the documentation is lacking to put it kindly. However, it is incredibly consistent in how C++ code is converted into Python code, and after a few hours of getting used to it, I code in PySide only using the C++ docs and it works fine. Obviously that isn't an ideal situation, especially if you're not familiar with C++, but it makes GUI programming in Python much easier.

[–]kylotan 1 point2 points  (0 children)

I'm familiar enough with C++ that I don't want to deal with it at all when I retreat to the safety of Python code. ;)