GUI - Qt Designer

Discussion in 'Python' started by John Bradbury, Nov 12, 2003.

  1. Is there any way to take the output produced by Qt designer (or any other
    GUI designer) and use it in Python to create a screen? There must be a
    better way of creating screens than having to use the TkInter routnes and
    add every widget one by one in the program.

    John Bradbury
     
    John Bradbury, Nov 12, 2003
    #1
    1. Advertising

  2. On Wednesday 12 November 2003 6:04 pm, John Bradbury wrote:
    > Is there any way to take the output produced by Qt designer (or any other
    > GUI designer) and use it in Python to create a screen? There must be a
    > better way of creating screens than having to use the TkInter routnes and
    > add every widget one by one in the program.


    Use the pyuic utility that comes with PyQt.

    Phil
     
    Phil Thompson, Nov 12, 2003
    #2
    1. Advertising

  3. John Bradbury

    John J. Lee Guest

    John Bradbury <> writes:

    > Is there any way to take the output produced by Qt designer (or any
    > other GUI designer) and use it in Python to create a screen? There

    [...]

    PyQt. It includes pyuic, which does what you want.


    John
     
    John J. Lee, Nov 12, 2003
    #3
  4. John Bradbury wrote:

    > Is there any way to take the output produced by Qt designer (or any other
    > GUI designer) and use it in Python to create a screen? There must be a
    > better way of creating screens than having to use the TkInter routnes and
    > add every widget one by one in the program.
    >
    > John Bradbury



    You need PyQt and/or PyKDE.

    You can use pyuic DialogWhatever.ui > DialogWhatever.py to convert the
    QtDesigner *.ui file to a python file.

    Then you can import it into a PyQt app and use it like any other python Qt
    class.

    One warning, however: It's not as easily portable as Tkinter. On windows,
    especially, it's pretty much only usable if you've bought the full Qt
    Commercial verson. The free version of Qt/Win only goes up to version 2.3.

    Boa-constructor is alpha still, but usable to make wxPython apps in a RAD
    environment.

    PythonCard was another alternative, but I'm not sure if it's still being
    maintained.

    Hope that helps!

    cya,
    Eric



    --
    ---
    s- should be removed to contact me...
     
    Eric Williams, Nov 12, 2003
    #4
  5. John Bradbury

    Jarek Zgoda Guest

    John Bradbury <> pisze:

    > Is there any way to take the output produced by Qt designer (or any other
    > GUI designer) and use it in Python to create a screen?


    You are not limited to PyQt, wxPython has few nice GUI designers, of
    which wxGLADE seems to be the easiest to use. Or -- at you will -- you
    can use xrc resources, wchich are native to wxWindows and can be shared
    between wxPython and wxWindows applications.

    The window designs (frames, forms) created with Qt Designer can be
    translated to Python code using pyuic tool. BlackAdder IDE has this
    support built-in, although I never tried this approach.

    --
    Jarek Zgoda
    Unregistered Linux User #-1
    http://www.zgoda.biz/ JID: http://zgoda.jogger.pl/
     
    Jarek Zgoda, Nov 12, 2003
    #5
  6. Phil Thompson wrote:

    > On Wednesday 12 November 2003 6:04 pm, John Bradbury wrote:
    >> Is there any way to take the output produced by Qt designer (or any other
    >> GUI designer) and use it in Python to create a screen? There must be a
    >> better way of creating screens than having to use the TkInter routnes and
    >> add every widget one by one in the program.

    >
    > Use the pyuic utility that comes with PyQt.
    >
    > Phil



    Thanks everyone for the very helpful repsonses. It seems to be a topic whch
    is not covered fully in the books ( at least the ones I have).

    John
     
    John Bradbury, Nov 13, 2003
    #6
  7. John Bradbury

    Jim Bublitz Guest

    John Bradbury wrote:

    > Thanks everyone for the very helpful repsonses. It seems to be
    > a topic whch is not covered fully in the books ( at least the
    > ones I have).


    Since you mentioned books ...

    http://www.opendocs.org/pyqt/

    Jim
     
    Jim Bublitz, Nov 13, 2003
    #7
    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. Steve B.
    Replies:
    4
    Views:
    989
    Cheryl D Wise
    Jun 1, 2007
  2. Alexander Higgins
    Replies:
    3
    Views:
    1,093
    Teemu Keiski
    Jul 30, 2007
  3. Chris Angelico
    Replies:
    1
    Views:
    225
    Wolfgang Keller
    Jun 14, 2012
  4. Dietmar Schwertberger
    Replies:
    5
    Views:
    313
  5. Dietmar Schwertberger
    Replies:
    5
    Views:
    363
Loading...

Share This Page