Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been working on a my first real project using PyQt lately. I've done just a little bit of work in Qt for C++ but nothing more than just messing around. I've found that the Qt python bindings are essentially just a straight port of C++ classes into python, which makes sense. The issue is that this creates a lot of messy, unpythonic code.

For example if you look at QAbstractItemModel, there's a lot of hoops you have to go through that forces you to hide the actual python.

I was just wondering if there's any intention of writing a python implementation of Qt that isn't necessarily just a wrapper? Either by Nokia or anyone else? I really like Qt but I would love to be able to write more pythonic code.

I hope this is OK to ask here. I'm not trying to start a GUI war or anything.

share|improve this question
    
QAbstractItemModel was really annoying, when I was using PyQt. I tried to stick QTableWidget, QTreeWidget etc., rather than QTableView, QTreeView, etc. and be forced to create my own model (unless I could just use some built in, like QFileSystemModel). –  gruszczy Jan 1 '11 at 4:07
    
Hmmm. Good point. I didn't think of that –  Falmarri Jan 1 '11 at 22:51

2 Answers 2

Take a look at PySide, Nokia's Python bindings for the QT framework. I can't give you a decent comparison (I only looked into it earlier this year, and opted for PyQt instead due to its maturity), but it looked promising.

share|improve this answer

I agree with your assessment of working with PyQt - Qt is an awesome framework but PyQt is clearly 'unpythonic' in many respects.

As for PySide, my understanding is that PySide is pretty much a clone of PyQt but entirely OpenSource LPG etc - no licensing fees at all. See http://www.qtrac.eu/pyqtbook.html#pyside - Mark Summerfield's site: "PySide is highly compatible with PyQt...."

BUT - using P3k and the latest PyQt package, things have gotten quite a bit more 'pythonic' - some of the Qt classes have been wrapped into generic python types, among them QString. You didn't mention what version of Python or Qt you're working with -try the latest and greatest and maybe you'll feel more comfortable.

HTH

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.