[webkit-qt] how to resize a plugin?

brook.hong at nokia.com brook.hong at nokia.com
Sat Jan 29 18:26:32 PST 2011


Yes, that's the problem.
Here is the code to test -- 

alert(document.getElementById("editobject36").height); //got 72 here
document.getElementById("editobject36").height = 273;
alert(document.getElementById("editobject36").height); //still got 72 here, and the edit object haven't been resized in the webpage.

----------------
Best Regards,
Brook Hong 


>-----Original Message-----
>From: webkit-qt-bounces at lists.webkit.org [mailto:webkit-qt-
>bounces at lists.webkit.org] On Behalf Of ext Benjamin Poulain
>Sent: Friday, January 28, 2011 11:26 PM
>To: webkit-qt at lists.webkit.org
>Subject: Re: [webkit-qt] how to resize a plugin?
>
>On 01/27/2011 09:35 AM, ext brook.hong at nokia.com wrote:
>> I have tried many ways to resize a plugin either from cpp code or
>> javascript code, but not succeed yet.
>> For example the plugin was created as below
>> ------------------------------------------------------------
>> QObject * WebPage::createPlugin(const QString & classid, const QUrl &
>> url, const QStringList & paramNames, const QStringList & paramValues)
>> {
>> QObject *result = 0;
>> if (classid == "editobject") {
>> QTextEdit * edit = new QTextEdit(view());
>> result = edit;
>> }
>> if (result)
>> result->setObjectName(classid);
>> return result;
>> }
>> ------------------------------------------------------------
>> And it was referred in HTML as
>> ------------------------------------------------------------
>> <object type='application/x-qt-plugin' classid='editobject'
>width='100%'
>> height='30%'></object>
>> ------------------------------------------------------------
>> The edit box shows in web page correctly, but there is no way to
>change
>> height from 30% to some other value?
>
>I am not sure to understand the problem.
> From JavaScript, if you set the height, that does not work?
>
>I suggest you to attach a small example so one can debug.
>
>cheers,
>Benjamin
>_______________________________________________
>webkit-qt mailing list
>webkit-qt at lists.webkit.org
>http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt


More information about the webkit-qt mailing list