[PyKDE] Embedding icon inside code
Hans-Peter Jansen
hpj at urpla.net
Mon Nov 10 11:14:01 GMT 2003
Hi Derek,
On Monday 10 November 2003 05:53, Derek Fountain wrote:
> I have some code which requires an icon. The icon is currently in a
> PNG file. I want to have this code as reusable as possible, ideally
> in a position where I can redistribute just one file. So I'd like a
> way of embedding the icon pixmap inside the class.
>
> Is that possible, and if so, how do I do it?
Have a look into the attached project. It takes the pyuic approach and
creates one module with all images embedded.
- Place all images in a project subdir
- Create a c++ project with designer
- Select "project imagefile" in form settings
- Add all images to designers image collection
- Read the supplied Makefile
Note, that inlining images with designer corrupts their alpha mask in
some cases (especially with hicolor KDE icons).
Let us know, if this approach satisfy you needs.
Pete
P.S.: Anybody here with an idea, how to make the mainExceptHook dialog
appear translated in test.py? All my attempts failed so far.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-0.3.tar.gz
Type: application/x-tgz
Size: 4448 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031110/4a8bf6e1/test-0.3.tar.bin
More information about the PyQt
mailing list