By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,209 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,209 IT Pros & Developers. It's quick & easy.

PyQt Help and Advice

P: n/a
Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way to
design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya

Jul 18 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Ilya Knizhnik enlightened us with:
However since PyQt is rather new, I have not found much
documentation on it, or examples in it. The only useful
tutorial/book I have found is at www.opendocspublishing.com/pyqt/
but it is not always clear for someone with almost no GUI
experience.


You might want to follow the QT tutorials that come with the QT
documentation. The best way to read the QT docs is through QT
Assistant. You can design GUIs with QT's 'designer' (it's called that
way, very original name) and convert the .ui files to .py files with
'pyuic'.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #2

P: n/a
On Tue, 29 Jul 2003 15:17:40 +0000, Ilya Knizhnik wrote:
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


If you're at all familiar with C++, or even if you're not, you'll find
Qt's API docs, http://doc.trolltech.com/3.0/ , very handy. I've found that
pyQt correlates almost exactly with them, except for some str QString
conversion issues. I refer to that all the time when I'm doing PyQt code.
Also, I don't know what OS or distro you're on, but there is a set of pyqt
examples out there. In redhat, I used the PyQt-examples rpm (case
sensitive), which installs a bunch of example programs to
/usr/share/doc/PyQt-examples-[version]. Also. as Sybren mentioned, the Qt
tutorial itself should be useful.. Finally, I'll say that the book you
mentioned is excellent, and a wonder source of example code. I liked it
enough that I bought it, and I'm happy I did.

Good luck with PyQt! The only issues I've had were related to QCanvas not
deleting canvas items (and therefore my program leaking them) if I don't
reuse them. I still haven't figured that out, so I just keep track of the
ones I create and reuse them, in order to prevent memory leaks.

Keith
Jul 18 '05 #3

P: n/a
On Tue, 29 Jul 2003, Ilya Knizhnik wrote:
I am fairly new to Python. I have found it an easy language to
learn and a very usefull one for many tasks. Currently I am working
on a python project that involves a GUI and it was suggested that
PyQt is the best way to design that GUI. However since PyQt is
rather new, I have not found much documentation on it, or examples
in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for
someone with almost no GUI experience. Does anyone have any
suggestions?


http://www.riverbankcomputing.co.uk/pyqt/index.php

Is a good starting point. Subscribe to the mailing list.

Jul 18 '05 #4

P: n/a
Keith Jones enlightened us with:
I've found that pyQt correlates almost exactly with them, except for
some str QString conversion issues.


Another thing to be wary about, is that "exec" is a reserved keyword
in Python. QDialog boxes, QApplication and perhaps some others that
have an exec() method in C++ are called exec_loop() in Python. Took me
a little while to figure out ;-)

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #5

P: n/a
il***@red.seas.upenn.edu (Ilya Knizhnik) writes:
[...]
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?


PyQt isn't new. The reason there's not documentation for every API
function is that the Python interface slavishly follows the C++ API
(actually, I believe you can now pay for documentation, but I don't
see the point). The PyQt docs just list the slight deviations from Qt
proper. The Qt docs are excellent, and you really don't need to know
C++ to understand them.
John
Jul 18 '05 #6

P: n/a
On Tuesday 29 July 2003 4:17 pm, Ilya Knizhnik wrote:
Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way
to design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


To correct one misconception...

PyQt was first released on November 1st 1998. There have been 34 releases in
all. The next release, including support for Qt v3.2.0, will be around August
12th. It isn't new.

Phil

Jul 18 '05 #7

P: n/a
On Wed, 30 Jul 2003 00:18:32 +0100, Phil Thompson wrote:

To correct one misconception...

PyQt was first released on November 1st 1998. There have been 34 releases in
all. The next release, including support for Qt v3.2.0, will be around August
12th. It isn't new.

Phil

Phil,

Any idea when Qt3.2 will have noncommercial support in windows?
Jul 18 '05 #8

P: n/a
il***@red.seas.upenn.edu (Ilya Knizhnik) wrote in message news:<bg***********@netnews.upenn.edu>...
Dear All,

I am fairly new to Python. I have found it an easy language to learn and
a very usefull one for many tasks. Currently I am working on a python
project that involves a GUI and it was suggested that PyQt is the best way to
design that GUI.
However since PyQt is rather new, I have not found much documentation on
it, or examples in it. The only useful tutorial/book I have found is at
www.opendocspublishing.com/pyqt/ but it is not always clear for someone
with almost no GUI experience.
Does anyone have any suggestions?

Ilya


We have a product called PyQtDoc that provides a very nice and
convenient interface for all the PyQt information. You can see
information on it at http://www.thekompany.com/products/pyqtdoc/

Best,
Shawn
Jul 18 '05 #9

P: n/a
Keith Jones enlightened us with:
Any idea when Qt3.2 will have noncommercial support in windows?


Probably when Qt 4.x has been released. If you want to stay current
and free, try Linux instead.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Jul 18 '05 #10

P: n/a
On Wednesday 30 July 2003 1:27 am, Keith Jones wrote:
On Wed, 30 Jul 2003 00:18:32 +0100, Phil Thompson wrote:
To correct one misconception...

PyQt was first released on November 1st 1998. There have been 34 releases
in all. The next release, including support for Qt v3.2.0, will be around
August 12th. It isn't new.

Phil


Phil,

Any idea when Qt3.2 will have noncommercial support in windows?


That's a question for Trolltech. I would certainly expect Qt v4 to be released
first.

Phil

Jul 18 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.