PyQt Help and Advice

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ilya Knizhnik

    PyQt Help and Advice

    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

  • Sybren Stuvel

    #2
    Re: PyQt Help and Advice

    Ilya Knizhnik enlightened us with:[color=blue]
    > 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.[/color]

    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?

    Comment

    • Keith Jones

      #3
      Re: PyQt Help and Advice

      On Tue, 29 Jul 2003 15:17:40 +0000, Ilya Knizhnik wrote:
      [color=blue]
      > 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[/color]

      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

      Comment

      • Bruce Sass

        #4
        Re: PyQt Help and Advice

        On Tue, 29 Jul 2003, Ilya Knizhnik wrote:[color=blue]
        > 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?[/color]



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

        Comment

        • Sybren Stuvel

          #5
          Re: PyQt Help and Advice

          Keith Jones enlightened us with:[color=blue]
          > I've found that pyQt correlates almost exactly with them, except for
          > some str QString conversion issues.[/color]

          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?

          Comment

          • John J. Lee

            #6
            Re: PyQt Help and Advice

            [email protected]. upenn.edu (Ilya Knizhnik) writes:
            [...][color=blue]
            > 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?[/color]

            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

            Comment

            • Phil Thompson

              #7
              Re: PyQt Help and Advice

              On Tuesday 29 July 2003 4:17 pm, Ilya Knizhnik wrote:[color=blue]
              > 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[/color]

              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

              Comment

              • Keith Jones

                #8
                Re: PyQt Help and Advice

                On Wed, 30 Jul 2003 00:18:32 +0100, Phil Thompson wrote:[color=blue]
                >
                > 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[/color]


                Phil,

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

                Comment

                • Shawn Gordon

                  #9
                  Re: PyQt Help and Advice

                  [email protected]. upenn.edu (Ilya Knizhnik) wrote in message news:<bg636k$40 [email protected] enn.edu>...[color=blue]
                  > 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[/color]

                  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

                  Comment

                  • Sybren Stuvel

                    #10
                    Re: PyQt Help and Advice

                    Keith Jones enlightened us with:[color=blue]
                    > Any idea when Qt3.2 will have noncommercial support in windows?[/color]

                    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?

                    Comment

                    • Phil Thompson

                      #11
                      Re: PyQt Help and Advice

                      On Wednesday 30 July 2003 1:27 am, Keith Jones wrote:[color=blue]
                      > On Wed, 30 Jul 2003 00:18:32 +0100, Phil Thompson wrote:[color=green]
                      > > 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[/color]
                      >
                      > Phil,
                      >
                      > Any idea when Qt3.2 will have noncommercial support in windows?[/color]

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

                      Phil

                      Comment

                      Working...