Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 7

Qt-interest Archive, May 2008
Webkit: How to override <object> size by plugin


Message 1 in thread

Hi Everybody, 

I have created a webkit plugin and it displays OK in the WebView. Currently, I have to manually adjust the height and width in the <object> tag in the HTML according to the content pointed to by the data value. I tried leaving out those attributes, but the tag then seems to use a default size, rather than the sizeHint of the widget created by the plugin. It would be nice if the <object> tag worked like <img> with respect to size, but I don't expect that will happen any time soon. 

Is there an easy way for the plugin to tell the browser code to use the sizeHint? Otherwise I can only think to connect a resized signal from the widget to a javascript slot with values to update the object. I was hoping to avoid Javscript if possible. 

Thanks in advance. 

Tony Rietwyk

--
 [ signature omitted ]