On Saturday 24 April 2010 11:18:35 Thomas Berg wrote:
> On Sat, Apr 24, 2010 at 1:49 AM, Thomas Berg <[email protected]> wrote:
> > the following missing symbols, all of which seem to be protected pure
> > virtual methods in QtCore classes. Any ideas or pointers on how to
> > solve this?
> 
> Turns out this was easy to solve too.
> 
> I modified shiboken/headergenerator.cpp such that it doesn't prefix
> the method call with the parent class name when calling these methods.
> For example, in the QIODeviceWrapper header, shiboken has to generate
> this:
> 
> inline qint64 writeData_protected(const char * data, qint64 len) {
> return writeData(data, len); }
> 
> instead of this:
> 
> inline qint64 writeData_protected(const char * data, qint64 len) {
> return QIODevice::writeData(data, len); }
> 
> So it seems that MSVC requires an exported symbol if you prefix the
> call with the classname. Since it is abstract, there is no symbol for
> it in the QtCore dll. Without the prefix it builds fine.

Nice, you are right, on GCC it links but we have a error at runtime.
Can you send a patch/merge request with this fix?

> Anyway, I now have a linked QtCore.pyd file!

You tried to import the generated module? Would be nice to have the first 
python hello world on windows using a QString :-D

> QtGui fails with this message, which I guess is another problem
> related to the protected hack:
> pyside\qtgui\pyside_qtgui_python.h(1864) : error C2248:
> 'QGraphicsItem::Extension' : cannot access
>  protected enum declared in class 'QGraphicsItem'

Yes, this is the problem with protected enums, we need to do some changes in 
the generator to deal with it, although it's not a hard task.

Anyway you achieved incredible results! Thanks, I'ḿ just waiting for your 
patches/merge requests.

> Regards,
> Thomas

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to