Results 1 to 2 of 2

Thread: qtwebkit-plugins load but not work

  1. #1
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question qtwebkit-plugins load but not work

    QtWebkit-plugins is a library that provides features to the QWebView, eg SpellCheck and Notification Web API .

    Read about:



    I tried to compile the code in Windows, but my QWebView not working as expected, in other words, SpellCheck and Notification Web API not working. It's like I've been not-using QtWebkit-plugins. Which can be?

    In the documentation that says to compile I have to run:

    Qt Code:
    1. $ qmake
    2. $ make && make install
    To copy to clipboard, switch view to plain text mode 

    Read more in QtWebkit-plugins repository

    I'm using mingw, instead of make I used mingw32-make:


    • I compiled hunspell
    • Copied hunspell for C:\Qt5.4.0\5.4\mingw491_32\bin and C:\Qt5.4.0\5.4\mingw491_32\lib
    • I compiled qtwebkit-plugins using in cmd:


    Qt Code:
    1. qmake
    2. mingw32-make && mingw32-make install
    To copy to clipboard, switch view to plain text mode 

    • mingw32-make generates libqtwebkitpluginsd.a and qtwebkitplugins.dll
    • Copied libqtwebkitpluginsd.a for C:\Qt5.4.0\5.4\mingw491_32\lib
    • Copied qtwebkitplugins.dll for C:\Qt5.4.0\5.4\mingw491_32\plugins\webkit and C:\Qt5.4.0\5.4\mingw491_32\bin



    After that I compiled another simple project that uses QWebView then tested the SpellCheck in a <textarea spellcheck="true"></textarea> and did not work.

    I tested the Notification Web API and also did not work.

    Note: When running my project using QT_DEBUG_PLUGINS=1 and use Notification Web API in the Application output tab (in QtCreator) returns:

    Qt Code:
    1. Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll, metadata=
    2. {
    3. "IID": "org.qtwebkit.QtWebKit.QtWebKitPlugin",
    4. "MetaData": {
    5. },
    6. "className": "QtWebKitPlugin",
    7. "debug": false,
    8. "version": 328704
    9. }
    10.  
    11.  
    12. loaded library "C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll"
    13. QLibraryPrivate::unload succeeded on "C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll"
    14. QSystemTrayIcon::setVisible: No Icon set
    To copy to clipboard, switch view to plain text mode 

    It seems to me that the .dll is loaded, it just is not working.

    How do my projects work these features?

    Sorry anything, I'm newbie. Thanks!
    Last edited by brcontainer; 8th March 2015 at 05:24.

  2. #2
    Join Date
    Apr 2013
    Posts
    65
    Thanks
    4
    Thanked 3 Times in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qtwebkit-plugins load but not work

    I solved

    For this work in QT5.4+ is necessary to modified the qwebkitplatformplugin.h file

    Change this:

    Qt Code:
    1. QT_BEGIN_NAMESPACE
    2. Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
    To copy to clipboard, switch view to plain text mode 

    By this:

    Qt Code:
    1. QT_BEGIN_NAMESPACE
    2. Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "org.qt-project.Qt.WebKit.PlatformPlugin/1.9");
    To copy to clipboard, switch view to plain text mode 

    If needed compatibility with QT-4.8 change the code for this:

    Qt Code:
    1. QT_BEGIN_NAMESPACE
    2. #if QT_VERSION >= 0x050200
    3. Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "org.qt-project.Qt.WebKit.PlatformPlugin/1.9")
    4. #else
    5. Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9")
    6. #endif
    7. QT_END_NAMESPACE
    To copy to clipboard, switch view to plain text mode 

    Pull-request: https://github.com/QupZilla/qtwebkit-plugins/pull/4
    Last edited by brcontainer; 8th March 2015 at 09:59.

Similar Threads

  1. Qt5 Load muliple plugins
    By porterneon in forum Qt Quick
    Replies: 0
    Last Post: 20th February 2013, 12:34
  2. Replies: 1
    Last Post: 6th June 2012, 01:41
  3. Replies: 0
    Last Post: 12th July 2011, 08:20
  4. 100% CPU usage when load Qtwebkit ?
    By Thành Viên Mới in forum Qt Programming
    Replies: 1
    Last Post: 28th May 2011, 03:20
  5. Load Plugins on Windows
    By ruben.rodrigues in forum Qt Programming
    Replies: 8
    Last Post: 13th May 2011, 07:39

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.