Hey Hugo,
Yep I'm calling :
if (!Shiboken::importModule("PySide.QtCore",
&SbkPySide_QtCoreTypes)) {
PyErr_SetString(PyExc_ImportError,"could not import
PySide.QtCore");
return;
}
if (!Shiboken::importModule("PySide.QtGui",
&SbkPySide_QtGuiTypes)) {
PyErr_SetString(PyExc_ImportError,"could not import
PySide.QtGui");
return;
}
In my extension modules init function and I have these globally
defined in my .cc file aswell :
#include <pyside_qtgui_python.h>
PyTypeObject** SbkPySide_QtCoreTypes;
PyTypeObject** SbkPySide_QtGuiTypes;
Does that look right to you?
Cheers,
D
On Jun 17, 7:38 am, Hugo Parente Lima <[email protected]> wrote:
> On Thursday 16 June 2011 16:22:07 Renato Araujo Oliveira Filho wrote:
>
>
>
>
>
>
>
>
>
> > Today I faced the same problem, after some investigation I found the
> > problem, this happened with me because I forgot to call the base
> > constructor on my derived class.
>
> > In you case check if you have called the base constructor on the
> > "control" class implementation.
>
> > BR
> > Renato
>
> > On Tue, May 31, 2011 at 8:38 PM, kungfuelmosan <[email protected]>
> wrote:
> > > Hey All,
>
> > > So we've just updated to PySide-1.0.3 from PySide-1.0.1 and we're
> > > getting a seg-fault when doing :
>
> > > #include <pyside_qtgui_python.h>
> > > PyTypeObject** SbkPySide_QtCoreTypes;
> > > PyTypeObject** SbkPySide_QtGuiTypes;
>
> If you create these variables and use converters of some module you need to
> call Shiboken::importModule to this module passing the correct PyTypeObject**
> to be initialized.
>
>
>
>
>
>
>
>
>
> > > PyObject *wrapper = Shiboken::Converter<QWidget*>::toPython(control);
>
> > > Is this still a supported interface? It's an extremely powerful
> > > feature, albeit an undocumented one as far as I can tell, so I'm
> > > wondering if maybe I'm just exploiting an unpublicized feature, are
> > > there any blog posts / docs about this (obtaining a PyObject wrapper,
> > > given a QWidget* C++ pointer) ?
>
> > > Heres the top bit of my gdb back-trace :
>
> > > #0 0x00007fffc85cc582 in Shiboken::BindingManager::resolveType(void*,
> > > SbkObjectType*) () from /vol/apps/pyside_qt4.7_kubuntu_10_04-1.0.3_64/
> > > lib/libshiboken-python2.6.so.1.0
> > > #1 0x00007fffc85c7bc3 in Shiboken::Object::newObject(SbkObjectType*,
> > > void*, bool, bool, char const*) () from /vol/apps/
> > > pyside_qt4.7_kubuntu_10_04-1.0.3_64/lib/libshiboken-python2.6.so.1.0
> > > #2 0x00007fffc74a1db7 in Shiboken::createWrapper<QWidget>
> > > (cppobj=0x4e68270, hasOwnership=false, isExactType=false) at /vol/apps/
> > > pyside_qt4.7-1.0.3_64/include/PySide/QtGui/pyside_qtgui_python.h:1943
> > > #3 0x00007fffc74a1e49 in
> > > Shiboken::ObjectTypeConverter<QWidget>::toPython (cppobj=0x4e68270)
> > > at /vol/apps/pyside_qt4.7-1.0.3_64/include/shiboken/conversions.h:222
> > > #4 0x00007fffc74a1bc6 in ... My Code ...
>
> > > Sorry I can't provide more info / code - stupid NDA's
>
> > > Cheers,
> > > Daniel
> > > _______________________________________________
> > > PySide mailing list
> > > [email protected]
> > >http://lists.pyside.org/listinfo/pyside
>
> --
> Hugo Parente Lima
> INdT - Instituto Nokia de Tecnologia
>
> signature.asc
> < 1KViewDownload
>
> _______________________________________________
> PySide mailing list
> [email protected]http://lists.pyside.org/listinfo/pyside
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside