[PyKDE] Using UI files in your app with PyQt4

Torsten Marek shlomme at gmx.net
Mon Jan 23 08:11:53 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Giovanni Bajo schrieb:
> Torsten Marek <shlomme at gmx.net> wrote:
> 
> 
>>>def compileToType(filename):
>>>    code_string = cStringIO.StringIO()
>>>    widget_info = Compiler.compileUi(file(filename, "r"),
>>>    code_string) # the buffer code_string now contains the generated
>>>    Python code widget_module = compile(code_string.getvalue(),
>>>    filename, "exec") exec widget_module
>>>    return locals()[widget_info["uiclass"]]
> 
> 
> This ought to be included within PyQt4.uic!
> 
> Giovanni Bajo
> 

Hi,

I'll put it into the next snapshot.

best regards

Torsten

- --
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146  894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD1I/JfMVFHqJEyFgRAhBuAKCnht55Q5pPMGjk7GyhReuG3m3RWACglWkG
h6MXmwV0b5S2dFtiCiVj52o=
=px/m
-----END PGP SIGNATURE-----




More information about the PyQt mailing list