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:

    @QUiLoader loader;
    QFileInfo fi( vl->editForm() );
    loader.setWorkingDirectory( fi.dir() );
    QWidget *myWidget = loader.load( &file, parent );
    file.close(); @

    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:

    @myobject.openform(path)@

    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:

    !http://i.imgur.com/7oZOwTn.png!

    with python27!PyByteArray_Size being were it crahes at.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.