Hi all,

I'm trying to call some Qt code from javascript, I'm
using addToJavaScriptWindowObject on a the main frame of a qwebview. I push
the qt object to every page using the javaScriptWindowObjectCleared()
signal.

Something like:


class MainWindow(QtGui.QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()

        QtCore.QObject.connect(self.webView.page().mainFrame(),
QtCore.SIGNAL('javaScriptWindowObjectCleared()'),
self.loadJavaScriptObjects)

     def loadJavaScriptObjects(self):
        self.webView.page().mainFrame().addToJavaScriptWindowObject("Qt",
self.someobject)



Everything works fine until I exit the application and then it crashes (I
get a windows crash report). I'm guessing it has something to do on how the
objects are destroyed when the application is closed but I have no idea how
to fix it. Any ideas?

I attach a complete example with the problem.

Many thanks,
Marcos.

Attachment: crash.py
Description: Binary data

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

Reply via email to