PyQt4 on Windows ?

Discussion in 'Python' started by Linuxguy123, Jan 19, 2009.

  1. Linuxguy123

    Linuxguy123 Guest

    What does it take to get a PyQt4 application running on a Windows
    machine ?

    I'm sorry if this is a redundant question, but I've searched this and I
    am not finding a comprehensive answer.

    If anyone is running a PyQt4 application on a Windows (XP or Vista)
    machine, I'd love to know how it works for you and how extensive the
    application is and how much of the Qt library it uses.

    Thanks
     
    Linuxguy123, Jan 19, 2009
    #1
    1. Advertisements

  2. Linuxguy123 wrote:
    > What does it take to get a PyQt4 application running on a Windows
    > machine ?


    To run, installing Python + PyQt4 ;-)

    To create a binary wrapper, I use py2exe (I also tried cx_Freeze, both
    work the same). There's a gotcha with PyQt4 - snippet follows:

    setup(
    options = {"py2exe": {"compressed": 1,
    "optimize": 2,
    "includes": ["sip"],
    "excludes": []}},
    service = [],
    com_server = [],
    console = [],
    windows = [modeler],
    )

    You need to include the "sip" module manually, it's not automatically
    discovered.

    To create an installer, I use NSIS.

    > I'm sorry if this is a redundant question, but I've searched this and I
    > am not finding a comprehensive answer.
    >
    > If anyone is running a PyQt4 application on a Windows (XP or Vista)
    > machine, I'd love to know how it works for you


    It works fine in a test setup. I didn't pursue this any further at the
    moment, because for the project in question we decided to deploy on
    MacOS X first and delay the Windows version.

    > and how extensive the application is and how much of the Qt library it uses.


    The application is currently 1200 LOC, 200 of which are autogenerated
    from Qt designer files. The final application will probably be about
    three times as large.

    It's a modeler application and I most of the code is thus centered
    around QGraphicsScene and two custom QGraphicsItems - one for nodes, one
    for edges. It's been a real pleasure that I get most functionality for
    the modeling app for free with (Py)Qt.

    -- Gerhard
     
    Gerhard Häring, Jan 20, 2009
    #2
    1. Advertisements

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. Harshad

    Drag and Drop with PyQt4

    Harshad, Aug 25, 2006, in forum: Python
    Replies:
    2
    Views:
    1,459
    Harshad
    Aug 26, 2006
  2. Skink

    models & editors in PyQt4

    Skink, Aug 30, 2006, in forum: Python
    Replies:
    3
    Views:
    730
    David Boddie
    Aug 30, 2006
  3. Tina I

    PyQt4 strangeness

    Tina I, Jan 23, 2007, in forum: Python
    Replies:
    3
    Views:
    409
    Tina I
    Jan 23, 2007
  4. hg
    Replies:
    25
    Views:
    916
    Sean Schertell
    Jan 26, 2007
  5. Mel
    Replies:
    5
    Views:
    1,559
    David Boddie
    Mar 13, 2007
  6. Tina I
    Replies:
    2
    Views:
    935
    Tina I
    Mar 7, 2007
  7. Chris Bergstresser

    Odd PyQt4 crash on exit when importing on windows

    Chris Bergstresser, Apr 6, 2008, in forum: Python
    Replies:
    0
    Views:
    557
    Chris Bergstresser
    Apr 6, 2008
  8. wgw
    Replies:
    1
    Views:
    618
Loading...