Results 1 to 5 of 5

Thread: Embed Plugin Widget into WebView

  1. #1
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    1

    Default Embed Plugin Widget into WebView

    I'm coding a application in which I embeded a plugin widget into webview.

    Figure:


    I reimplemented QWebPluginFactory::create to create QPushButton plugin.

    Qt Code:
    Qt Code:
    1. QObject *CyWebPluginFactory::create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const {
    2. Q_UNUSED(url);
    3. Q_UNUSED(argumentNames);
    4. Q_UNUSED(argumentValues);
    5. if (mimeType != "pushbutton")
    6. return 0;
    7.  
    8. return new QPushButton(QString("Plugin Widget"));
    To copy to clipboard, switch view to plain text mode 

    Then, I write a code HTML. It contains <Object> tag to embed QPusbButton into web page.
    Html Code:
    Qt Code:
    1. ....
    2. <style type="text/css">
    3. .divWidget {
    4. width: 300px;
    5. height: 400px;
    6. background-color: blue;
    7. position: absolute;
    8. z-index: 1000000;
    9. }
    10.  
    11. .pluginWidget {
    12. width: 600px;
    13. height: 300px;
    14. background-color: red;
    15. position: absolute;
    16. z-index:-1;
    17. }
    18. </style>
    19. ....
    20. <div class="divWidget">DIV Widget</div>
    21. <div class="pluginWidget"><object type="pushbutton" data="" width="100" height="50"></object></div>
    22. ....
    To copy to clipboard, switch view to plain text mode 

    I write two div block.
    - One's blue which contain "DIV Widget" string.
    - One's red which contain plugin widget.

    I assigns z-index attribute of blue block with a big number because I want it's on top (always on top).

    But I'snt work.
    Plugin Widget is always on top.

    I need help to solve this problem.
    Thanks.
    Attached Files Attached Files
    Last edited by hvitual; 28th June 2010 at 14:48.

  2. #2
    Join Date
    Jun 2010
    Posts
    3
    Thanked 1 Time in 1 Post

    Default Re: Embed Plugin Widget into WebView

    I have same problem....
    ------------------------------------------------

  3. The following user says thank you to mus001 for this useful post:

    hvitual (15th July 2010)

  4. #3
    Join Date
    Aug 2009
    Posts
    11
    Thanks
    1

    Default Re: Embed Plugin Widget into WebView

    Thanks ......................
    -------------------------------------------------

  5. #4
    Join Date
    Mar 2012
    Posts
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Embed Plugin Widget into WebView

    I have the same problem on both Qt 4.7.4 and it seems not fixed in Qt4.8.0.
    So I made a simple work-around to repaint the below image above the plugin.

    If you guys are interested can contact me.

  6. #5
    Join Date
    Jul 2013
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Embed Plugin Widget into WebView

    Quote Originally Posted by waper View Post
    I have the same problem on both Qt 4.7.4 and it seems not fixed in Qt4.8.0.
    So I made a simple work-around to repaint the below image above the plugin.

    If you guys are interested can contact me.
    Please do put your workaround.
    Thanks a lot

Similar Threads

  1. Replies: 22
    Last Post: 14th October 2010, 17:44
  2. Embed QColorDialog as a widget
    By totem in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2010, 00:40
  3. How do you embed a widget in a graphics item?
    By technoViking in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 06:09
  4. How to embed coin widget inside qt window?
    By jwieland in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2009, 15:50
  5. Replies: 1
    Last Post: 14th June 2006, 14:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.