PyQt documentation

E

Eric Jardim

Hi,

Is there any site that gather all the documentation about PyQt?

The docs of the Riverbank site is poor, and I have found separate
tutorials on the net.

I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not
free doc.

Does anybody know anything about any project for making PyQt
development more easy?

thanks,

[Eric Jardim]
 
D

Diez B. Roggisch

The docs of the Riverbank site is poor, and I have found separate
tutorials on the net.

I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not
free doc.

You can use the qt c++ doc from trolltech. The pyqt bindings are so close to
the original that you usually can simply use that. Additionally, there is a
book from boudewijn rempt about coding in python+qt which is for qt2, but
it covers all the signal slot basics and is completely available online.
Does anybody know anything about any project for making PyQt
development more easy?

There is an python-based ide which has the same name as your first name -
try that.
 
T

Tim Jarman

Eric said:
Hi,

Is there any site that gather all the documentation about PyQt?

The docs of the Riverbank site is poor, and I have found separate
tutorials on the net.

Check out http://www.opendocs.org/pyqt/
I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not
free doc.

Does anybody know anything about any project for making PyQt
development more easy?

Someone else already referred you to the excellent Eric IDE.
thanks,

[Eric Jardim]
 
E

Eric Jardim

You can use the qt c++ doc from trolltech.
The pyqt bindings are so close to he original that
you usually can simply use that.

Yes, I currently use it.

Additionally, there is a book from boudewijn rempt
about coding in python+qt which is for qt2, but
it covers all the signal slot basics and is completely
available online.

I know the book, too. But It would be more practical to have a
Qtdoc-like for python, don't you think?

There is an python-based ide which has the same
name as your first name - try that.

Sure, I use it too. It's great.

The point is that if someone is familiar just to Python and not Qt, or
the reverse, familiar to Qt and not to Python, it is difficult to see
the *little* details of implementation.

I say this because I am familiar to Qt and not much to Python, and
there are simple little mistake I do, that could be avoided if a simple
example explained it. And a searchable API with examples would be
perfect for rapid development.

Think about more *new* people using PyQt. I think PyQt if a great
(actually the gratest ever, IMO) development "enviroment" and as more
people use it, better it gets.

Thats the reason I want to know if there is a "Qtdoc-like" PyQt doc. If
it does not exists, let's make it :)

Wanna join?

[Eric Jardim]
 
D

Diez B. Roggisch

The point is that if someone is familiar just to Python and not Qt, or
the reverse, familiar to Qt and not to Python, it is difficult to see
the *little* details of implementation.

I say this because I am familiar to Qt and not much to Python, and
there are simple little mistake I do, that could be avoided if a simple
example explained it. And a searchable API with examples would be
perfect for rapid development.

Think about more *new* people using PyQt. I think PyQt if a great
(actually the gratest ever, IMO) development "enviroment" and as more
people use it, better it gets.

Thats the reason I want to know if there is a "Qtdoc-like" PyQt doc. If
it does not exists, let's make it :)

Wanna join?

No. I did do some heavy qt development the last fall, and I never ran into
troubles because of lack of documentation. So at least for me, there is no
need for such a kind of documentation.

Above that I think that your desire for that docs stems from the need for
getting into pythonesque programming whilst developing a qt-app, I have to
say that I don't think that that's a too viable approach in general. Think
of trying to learn C++ using Qt. It's hard enough to grasp the gist of the
language itself - let alone the complications a elaborated - and in this
case even with special preprocessors equipped - library as qt.

So maybe a better way for you would be to learn python by its own, then
trying to use it in conjunction with qt.

Apart from that, I personally found that nearly _no_ python specific stuff
was necessary for my doings - at least out of my head I can't come up with
an example, except name clashes (exec renamed to exec_loop, as its a
keyword in python). All I had to do to make e.g. examples given in C++ work
was to strip curly braces and type declarations. So again: I don't see the
need for that doc. But that's IMHO, of course.
 
D

djw

Eric said:
Hi,

Is there any site that gather all the documentation about PyQt?

The docs of the Riverbank site is poor, and I have found separate
tutorials on the net.

I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not
free doc.

Does anybody know anything about any project for making PyQt
development more easy?

thanks,

[Eric Jardim]

If you follow a few simple rules, you can use the C++ Qt docs as-is:

1. Replace ::'s with .'s
2. Replace ->'s with .'s
3. Access to things like .text member variables have to be done with .text()
4. .exec() becomes .exec_loop()
5. Follow the PyQt instructions on how to do signals and slots with
connect()
6. Convert QStrings with str() from Qt functions/methods if you want to
work with them with std. Python string functions

I'm sure there's a few more, but those are the main ones. Its actually
very easy to convert in your head as you go to the proper Pythonic usage
of Qt.

-Don
 
J

Jarek Zgoda

djw napisa³(a):
6. Convert QStrings with str() from Qt functions/methods if you want to
work with them with std. Python string functions

No, no, no, don't do it, don't use str()! Your python will choke in any
non-ascii character! Use unicode objects and you will be safe from those
non-anglosaxons who use all these rubbish european characters such as
umlauts, cedillas, ogoneks and so on.
 
E

Eric Jardim

[...]
So maybe a better way for you would be to learn python by its own, then
trying to use it in conjunction with qt.
[...]

The purpose of doing this help is not to help *me*, but help *anyone*
who wants to use PyQt. I myself am quite confortable with the Qtdoc.

But there are cases that the PyQt doc and Qt doc are not enough.

This happened to me when I tryed to use the QTextStream objects. There
is nothing on the docs where it says that you cannot use this object
for writing. It is silly, but I had to search the web and send a
message to the mailing list to know that one *don't* use the Qt stream
classes for writing.

It may be silly, but is time comsumption and can confuse someone,
especially newbies.


[...]
So again: I don't see the
need for that doc. But that's IMHO, of course.
[...]

*You* may not need. But think about other people. By the way, I found 9
"I"s on your last message. Don't be that selfish :)

The proposal is up.

[Eric Jardim]
 
D

Diez B. Roggisch

Eric said:
*You* may not need. But think about other people. By the way, I found 9
"I"s on your last message. Don't be that selfish :)

That's right - and it was done to express not my unarguably existing
selfishness, but to strech the fact that it was my opinion that not
necessarily qualifies as being "the one and only" opinion and didn't want
to discourage you too much. Never try to stop volontary workers (at least
not in documentation.. :)

But I'd still hold the impression that your problems might stem from you
wanting to code qt, before done in c++ and just by "accident" in python.
All real nasty problems I ran into appeared when I tried to do things that
are not complementary between python and qt (like the gui stuff) but in the
common subset. My troubles once came from using QThread (made my app
totally crash). QText*Stream plays for me in the same league: python itself
is perfectly capable of reading and writing data to disk/memory/your
wallpaper. So being a pythoneer, it never occured to me to use
QText*Streams :)

No having said that, I totally agree that such information is surely needed
- but I doubt that it really makes sense to create full docs at a api
level. It would be hard to be in sync with the qt development itself.

Instead a wiki which captures the various pitfalls would be cool. And it
appears it exists:

http://www.diotavelli.net/PyQtWiki

So maybe enhancing that would be an option for you?
 
E

Eric Jardim

[...]
No having said that, I totally agree that such information is surely needed
- but I doubt that it really makes sense to create full docs at a api
level. It would be hard to be in sync with the qt development itself.

I agree with that. But there are alternative ways of doing this without
being perfectly sync with Qt API.

Instead a wiki which captures the various pitfalls would be cool. And it
appears it exists:
http://www.diotavelli.net/PyQtWiki

Fine, we finnaly got the point. A Wiki is perfect for "imperfect"
tasks.

So maybe enhancing that would be an option for you?

Yes, maybe. I'll take look.

thanks again,


[Eric Jardim]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top