[PyKDE] qRgb and distribution
Philippe Fremy
philippe at yalbi.com
Tue Nov 21 20:21:51 GMT 2000
Hi,
I don't know if this is fixed in PyQt 2.2, but in PyQt 2.1, the qRgb() function
and the QColor::rgb() function which are both supposed to return a QRgb value
are not consistent:
>>> qRgb(0,0,0)
-16777216
>>> col = QColor(0,0,0)
>>> col
<qt.QColor instance at 8111dc0>
>>> col.rgb()
(0, 0, 0)
The enum is a good idea but I still prefer the int value. And since QRgb is a
typedef int, I would have expected its value to be 0 for (0,0,0).
My application is almost finished and I'm looking at how I will
distribute it. The problem is that I think only a few people have PyQt already
installed on their box. Because my application is very small, and because PyQt
is big and long to compile, I feel that requiring people to install it will be
a disincentive to use my app. And I don't like that :-)
Phil Thompson already answered me here that the only files I needed to run a
PyQt application are libip.so, libqtcmodule.so and qt.py. So I could perhaps
distribute them precompiled in a subdir and tell people to set their
PYTHONPATH and LD_LIBRARY_PATH accordingly but this is not the correct way to
go.
What I would prefer in fact would be either a packaged binary (rpm, debs, ...)
for PyQt or simply an pseudo-packaged PyQt. By "pseudo packaged", I mean a
small archive containing only libsip.so, libqtcmodule.so and qt.py, compiled
for x386 (99% or the linux box around), that would check for correct python and
qt version and then install itself in standard places.
Is this possible ? Is it a good idea ? I guess I am not the only one facing
this problem, how do you, PyQt applications developers, cope with it ?
Last thought: Is there a PyQt program repository ? That would help in code
sharing and advertising. The PyQt homepage looks like a good place for this,
no ?
regards,
Philippe
More information about the PyQt
mailing list