PyQt Help and Advice

Discussion in 'Python' started by Ilya Knizhnik, Jul 29, 2003.

  1. 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
    Ilya Knizhnik, Jul 29, 2003
    #1
    1. Advertising

  2. 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?
    Sybren Stuvel, Jul 29, 2003
    #2
    1. Advertising

  3. Ilya Knizhnik

    Keith Jones Guest

    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
    Keith Jones, Jul 29, 2003
    #3
  4. Ilya Knizhnik

    Bruce Sass Guest

    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.
    Bruce Sass, Jul 29, 2003
    #4
  5. 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?
    Sybren Stuvel, Jul 29, 2003
    #5
  6. Ilya Knizhnik

    John J. Lee Guest

    (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
    John J. Lee, Jul 29, 2003
    #6
  7. 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
    Phil Thompson, Jul 30, 2003
    #7
  8. Ilya Knizhnik

    Keith Jones Guest

    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?
    Keith Jones, Jul 30, 2003
    #8
  9. Ilya Knizhnik

    Shawn Gordon Guest

    (Ilya Knizhnik) wrote in message news:<bg636k$408g$>...
    > 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
    Shawn Gordon, Jul 30, 2003
    #9
  10. 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?
    Sybren Stuvel, Jul 30, 2003
    #10
  11. 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
    Phil Thompson, Jul 30, 2003
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Asun Friere
    Replies:
    1
    Views:
    492
    Paul Boddie
    Aug 27, 2003
  2. Peter Hansen
    Replies:
    23
    Views:
    862
    Anton Vredegoor
    Sep 5, 2003
  3. Gerrit Holl
    Replies:
    16
    Views:
    613
    Tom Plunket
    Aug 29, 2003
  4. Asun Friere
    Replies:
    0
    Views:
    475
    Asun Friere
    Aug 28, 2003
  5. ulysses
    Replies:
    4
    Views:
    757
    Werner Schiendl
    Oct 22, 2003
Loading...

Share This Page