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

PyQt documentation

P: n/a
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]

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


P: n/a
> 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.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #2

P: n/a
Eric Jardim wrote:
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]


--
Website: www DOT jarmania FULLSTOP com
Jul 18 '05 #3

P: n/a
> 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]

Jul 18 '05 #4

P: n/a
> 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.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #5

P: n/a
djw
Eric Jardim wrote:
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
Jul 18 '05 #6

P: n/a
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.

--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
Jul 18 '05 #7

P: n/a
[...]
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]

Jul 18 '05 #8

P: n/a
Eric Jardim wrote:
*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?

--
Regards,

Diez B. Roggisch
Jul 18 '05 #9

P: n/a
[...]
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]

Jul 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.