[Qt-interest] anyone gotten QWebPage::createPlugin() to work?

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Fri May 8 03:45:31 CEST 2009


Paul wrote:

> I'm trying to embed a custom widget into a web page and using 
> the HTML 
> <object> element an overridden createPlugin() method. The method is 
> getting called and my widget is getting constructed, but it 
> is not being 
> displayed in the resulting page.
> 
> The documentation is pretty sparse in this area and the few examples 
> I've found don't really got into more detail.
> 
> Is there some magic step I'm missing?

Hi Paul, 

I use a QWebPluginFactory, and override the create method which just creates
and returns the appropriate widget depending on the parameters. 

It works well in 4.5.  In 4.4, there were repaint issues when scrolling in
the web view. 

My only problem now is how to get the sizeHints from the widget to override
the <object> tag size! 

Hope that helps, 

Tony.





More information about the Qt-interest-old mailing list