[PyKDE] what about size_t & friends? and PyQT on HPUX
Gerard Vermeulen
gvermeul at grenoble.cnrs.fr
Wed Jan 14 10:00:01 GMT 2004
I'll address the size_t issue first:
The problem is that the size and type of size_t & friends are compiler
dependent. I will try to solve this for PyQwt, but in an ideal world sip
would know about size_t & friends.
A somewhat related problem is PyQt's "typedef unsigned QRgb;"
Functions returning a QRgb may return a negative Python integer which
is unusable for PyQt functions taking a QRgb value.
Example: I have translated the following C++
const QPixmap pm = QPixmap::grabWidget(this);
const QRgb rgb = pm.convertToImage().pixel(e->x(), e->y());
emit selected(QColor(rgb));
as:
pm = QPixmap.grabWidget(self)
color = QColor()
color.setRgb(pm.convertToImage().pixel(event.x(), event.y()))
self.emit(PYSIGNAL("colorSelected"), (color,))
> I had to add -AA to CXXFLAGS and to LIBS I had to add "-lCsup_v2 -lstd_v2"
> to LIBS. I gather that somewhere in the build process, the system grabs the
> QT build info from qtmake.conf in the QT directory. However, one file was
> modified to use some newer stuff that QT never used so the .conf file never
> needed those additional flags and libraries.
>
I grepped the *.conf files for the flags and libs you mention, but found nothing.
Can you tell me which conf file applies to your system?
>
> FYI, PyQwt also has the same problems, and another two files break things in
> PyQwt which sees "size_t" in the Qwt code as merely an "unsigned' when it
> should be an "unsigned long".
>
Noted.
The Distutils allow you to pass at least the libraries on the command line:
python setup.py build_ext --force --libraries="Csup_v2 std_v2"
I have to think about the compiler flag.
Gerard
More information about the PyQt
mailing list