PyQt documentation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Jardim

    PyQt documentation

    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]

  • Diez B. Roggisch

    #2
    Re: PyQt documentation

    > The docs of the Riverbank site is poor, and I have found separate[color=blue]
    > tutorials on the net.
    >
    > I know that the Kompany have made a "Qtdoc"-like to PyQt. But it is not
    > free doc.[/color]

    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.[color=blue]
    >
    > Does anybody know anything about any project for making PyQt
    > development more easy?[/color]

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

    --
    Regards,

    Diez B. Roggisch

    Comment

    • Tim Jarman

      #3
      Re: PyQt documentation

      Eric Jardim wrote:
      [color=blue]
      > 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.
      >[/color]

      Check out http://www.opendocs.org/pyqt/
      [color=blue]
      > 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?
      >[/color]

      Someone else already referred you to the excellent Eric IDE.
      [color=blue]
      > thanks,
      >
      > [Eric Jardim][/color]

      --
      Website: www DOT jarmania FULLSTOP com

      Comment

      • Eric Jardim

        #4
        Re: PyQt documentation

        > You can use the qt c++ doc from trolltech.[color=blue]
        > The pyqt bindings are so close to he original that
        > you usually can simply use that.[/color]

        Yes, I currently use it.

        [color=blue]
        > 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.[/color]

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

        [color=blue]
        > There is an python-based ide which has the same
        > name as your first name - try that.[/color]

        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]

        Comment

        • Diez B. Roggisch

          #5
          Re: PyQt documentation

          > The point is that if someone is familiar just to Python and not Qt, or[color=blue]
          > 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?[/color]

          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

          Comment

          • djw

            #6
            Re: PyQt documentation

            Eric Jardim wrote:[color=blue]
            > 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]
            >[/color]

            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

            Comment

            • Jarek Zgoda

              #7
              Re: PyQt documentation

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

              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/

              Comment

              • Eric Jardim

                #8
                Re: PyQt documentation

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

                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.


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

                *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]

                Comment

                • Diez B. Roggisch

                  #9
                  Re: PyQt documentation

                  Eric Jardim wrote:[color=blue]
                  > *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 :)[/color]

                  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:



                  So maybe enhancing that would be an option for you?

                  --
                  Regards,

                  Diez B. Roggisch

                  Comment

                  • Eric Jardim

                    #10
                    Re: PyQt documentation

                    [...][color=blue]
                    > No having said that, I totally agree that such information is surely[/color]
                    needed[color=blue]
                    > - 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.[/color]

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

                    [color=blue]
                    > Instead a wiki which captures the various pitfalls would be cool. And[/color]
                    it[color=blue]
                    > appears it exists:
                    > http://www.diotavelli.net/PyQtWiki[/color]

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

                    [color=blue]
                    > So maybe enhancing that would be an option for you?[/color]

                    Yes, maybe. I'll take look.

                    thanks again,


                    [Eric Jardim]

                    Comment

                    Working...