[PyKDE] Qt4 and uic - dynamic generation
Sebastian Kügler
sebas at kde.nl
Thu Jul 21 11:42:09 BST 2005
Hi,
On Thursday 21 July 2005 12:25, Jeremy Sanders wrote:
> Would it be possible for PyQt to have the ability to dynamically interpret
> Qt designer files, and construct dialogs classes from these at runtime?
> This would be much nicer than having to generate Python source code. This
> would be like Glade in GTK.
Not sure if I'd like to do this ...
* I actually like the way it is done right now, you can easily subclass the
generated python code, and I'm not sure how this should be done when
using .ui files directly. Furthermore, it might add overhead to do this at
runtime.
* It's quite easy right now to create the UI in designer and then just modify
the code, so that your program is just one file / script and not multiple
ones. This can ease fiddling with correct pathes in some cases.
* Simon Edwards pykdeextensions [0] already provide functionality to
automatically compile .ui files at install time
* Learning pyqt/pykde from the generated source code would be much harder if
possible at all
* The only advantage I see is that one step is saved when developing an .ui
file, and that one could be easily scripted (just run pyuic foo.ui -o
foo_ui.py && foo.py, for example)
> Presumably (not having looked at the uic format) this may not be very hard
> to do, given Python's dynamic nature.
I'm unsure what would that buy us.
[0] http://www.simonzone.com/software/pykdeextensions/
Cheers,
--
sebas
http://www.kde.nl | http://vizZzion.org | GPG Key ID: 9119 0EF9
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Give a man a fire and he's warm for the day. Set fire to him and he's warm for
the rest of his life
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050721/db055fcf/attachment.bin
More information about the PyQt
mailing list