[PyKDE] PyQt for Python 2.4?

Mike Meyer mwm at mired.org
Wed Dec 15 07:11:53 GMT 2004


In <20041214083835.1183d827.gerard.vermeulen at grenoble.cnrs.fr>, Gerard Vermeulen <gerard.vermeulen at grenoble.cnrs.fr> typed:
> > c++ -c -pipe -fPIC -O -pipe -mpreferred-stack-boundary=2 -march=athlon -Wall -W -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I. -I/usr/opt/include -I/usr/opt/include/python2.4 -I/usr/X11R6/include -o sipqtQString.o sipqtQString.cpp
> > sip/qt/qstring.sip: In function `int convertTo_QString(PyObject*, void**, int*)':
> > sip/qt/qstring.sip:854: error: conversion from `long unsigned int' to `const QChar' is ambiguous
> > /usr/X11R6/include/qstring.h:295: note: candidates are: QChar::QChar(int)
> > /usr/X11R6/include/qstring.h:289: note:                 QChar::QChar(uint)
> > /usr/X11R6/include/qstring.h:283: note:                 QChar::QChar(short int)
> > /usr/X11R6/include/qstring.h:277: note:                 QChar::QChar(ushort)
> > /usr/X11R6/include/qstring.h:258: note:                 QChar::QChar(uchar)
> > /usr/X11R6/include/qstring.h:252: note:                 QChar::QChar(char)
> Presumably you have UCS4 unicode encoding.  I guess that in ???/include/python/pyconfig.h you
> have a line:
> #define PY_UNICODE_TYPE long unsigned int
> (the 'int' may be missing).
> 
> If so, you can work around your problem with casts. Change the line to:
>         qstring[i] = QChar(uint(py_unicode_string[i]));

Worked like a charm. Thank you.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.




More information about the PyQt mailing list