Crash calling C++ method using QUiLoader from PyQt4
I'm getting this really strange problem with a PyQt4 and Qt C++ application.
In the C++ application I have a method that loads a UI file using QUiLoader, nothing crazy about the code:
QFileInfo fi( vl->editForm() );
loader.setWorkingDirectory( fi.dir() );
QWidget *myWidget = loader.load( &file, parent );
This works fine until I tried to call it from PyQt4 giving it a form with a custom widget. It will crash on the QUiLoader loader; line.
Example python code:
However if I call openform from within C++ using one of the C++ based tools in my application it will open the form correctly. After that I can call myobject.openform() from Python and it will work fine.
The error that I get when trying to call myobject.openform() from Python is:
with python27!PyByteArray_Size being were it crahes at.