tags:

views:

506

answers:

3

Hi,

I have started using Python for web development recently, it's kinda cool; I have seen programs that are developed in QT/C++, which is good enough in terms of esthetics; I have just noticed the new PySide project (which brings LGPL Qt license to Python and it doesn't support Windows yet).

In view of the above, I see the possibility of using Python + PyQt/PySide to develop cross platform apps in the future :) but I have several doubts right now:

  1. Can PyQty/PySide be used to develop really complex/modern UI? Can somebody give me some points to have a look at some nice-looking screenshots of apps that are developed in Python+QT?
  2. What about the performance of using Python + QT for a desktop app?

Thanks in advance!

A: 

There is no aesthetic difference between the look and feel of C++ based Qt, and the PyQt and PySide wrappers on top of it. I use basically no desktop GUI apps so I couldn't point you to any implemented with any of these language/toolkit combos, but if you like the former, you'll be hard put to distinguish it in any way from the latter.

Alex Martelli
HI Alex, good to know that.
Edwin
+2  A: 

Can PyQty/PySide be used to develop really complex/modern UI?

Desktop applications come in all sorts of varieties -- some nicely laid out, some extremely customized with virtually no semblance to a standard application for that OS. The same can be done with Qt/PyQt/PySide. As Alex said, there should be no visible difference between an application written with PyQt/PySide versus one written with Qt in C++. Any program written with Qt4 (using bindings or not) will, by default, look like a standard modern application.

Of course, there are features of recent Windows releases (and likely some on Mac OS X) that aren't supported immediately and by default in Qt, but you can almost always write some custom platform specific code for those situations where said features are truly important.

Can somebody give me some points to have a look at some nice-looking screenshots of apps that are developed in Python+QT?

The best and most open source program that I know of and which is written with PyQt, is Eric -- a Python based IDE.

What about the performance of using Python + QT for a desktop app?

For most applications the performance difference between a C++ Qt application and a PyQt application are not noticible. But if you really need performance, you can write certain parts of the application in C++ and make bindings available in Python so you can integrate the two.

Kaleb Pederson
thank you, Kaleb. Now the only thing I worry about is the development speed...
Edwin
development speed of python and Qt is amazing. Recently, in the company I work was the very time-constrained project. We desided to try Python+Qt to speed development and succeeded. Notice, that it was first project in python for all the team, and we had only a week to learn python before start.I was amazed with flexibility and simplicity of python. (VCL/.NET/C++/Qt former experience)
Max
But!Note, that if you want to achieve some unusual behaviour or vision from Qt it is VERY simple (due to excellent documntation and clean and open code of Trolls) but needs some work. Out-of-the-box Qt user interface components is just awful comparing to .NET's and even VCL. And (SURPRISE!) there are no good component libraries (nor for money or free) for Qt.
Max
@Max can you elaborate on the interface components being "awful" when compared to .NET and VCL?
Kaleb Pederson
@Kaleb Pederson 1. Qt UI has slightly alien look'n'feel comparing to native apps in windows, it is very annoying. 2. *Views and *Widgets inherited from AbstractItemView has rather weird and complicated interface. F.ex. try to fill one with data item by item and then do it with native .NET or DevExpress or VirtualTreeView or any component of that kind. Then try to use QDockWidget and compare it's functionality to any other dock component you know.
Max
@Kaleb Pederson Then try to implement UI with QtDesigner, using QTableWidget f.x., try to tune view's look (start with setting proper widths and behaviour to columns or rows).I faced numerous little troubles setting UI with Qt, that was a little part of them.
Max
@Kaleb Pederson Layouts concept is somewhat great as signal/slot is.
Max
@Max - Thanks for the feedback. I'm in Linux 99% of the time and haven't noticed any of those issues, but I'll spend some time comparing when I get a chance. `QTableWidget` is a convenience widget that purposefully doesn't give you all the control of normal widgets. Normally you'd use a `QAbstractItemModel` subclass and a corresponding `QTableView`. Admittedly, designer is a bit limited and limiting (ok, quite limiting when compared to Expression Blend and similar things).
Kaleb Pederson
@Kaleb Pederson. On QTableView/Widget: convenience widget is intended to cover most usual developer needs, and do it the simplest and most obvious way, doesn't it? Not in Qt. And designer is limited comparing to any I've ever seen, if you trying to find obvious things, like data binding or component customising, but it has amazing features, that no other UI tool has. Custom properties and class promoting are some of them.It is though obvious problem for soft, that made by coders, for coders, when one does something mostly for fun, not money. Devil is in details.
Max
A: 

A bit late but for the record, apps such as Skype, GoogleEarth or the recent versions of VLC (media player & more) used the Qt libs.

Sun Wukong