[PyQt] QWebPage plug-ins
phil at riverbankcomputing.com
Sun Jun 14 13:26:38 BST 2009
On Sun, 14 Jun 2009 12:05:26 +0200, Alejandro Serrano <trupill at gmail.com>
> I'm trying to use QWebView to show some information to the user. However,
> need to include a custom plug-in for the task. Following some tutorials,
> that I has to implement some functions in QWebPage, and more important,
> register my plug-in types in the MetaType system (or something like
> With PyQt 4.4, I was using some sort of hack: I created a QVariant of
> instance of the type I wanted to register and everything worked (I read
> some post in this list). But I updated to PyQt 4.5 and everything stopped
> working, now it seems that just using QVariant(<instance>) does not
> the type. What's the correct way to do it now?
> If it was possible, I would like not to use C++ code, because the app
> be easily portable.
It's true that earlier versions of PyQt registered a lot of C++ types that
Qt didn't register automatically, but that was an implementation detail and
not documented behavior. As the registration is template based it has to be
done from C++.
More information about the PyQt