Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How to compile qtwebkit-plugins?
Forum Updated to NodeBB v4.3 + New Features

How to compile qtwebkit-plugins?

Scheduled Pinned Locked Moved Qt WebKit
spellcheckqwebviewqtwebkitwindowsmingw
15 Posts 2 Posters 6.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    You should run your application with the QT_DEBUG_PUGINS environment variable set to 1 to see if the plugins are found and if they encounter a problem loading. You can do that in the run part of the Project panel

    Hope it helps

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • B Offline
      B Offline
      brcontainer
      wrote on last edited by brcontainer
      #3

      @SGaist said:

      Hi,
      You should run your application with the QT_DEBUG_PUGINS environment variable set to 1 > to see if the plugins are found and if they encounter a problem loading. You can do that in the run part of the Project panel

      Hope it helps

      Thanks, I added in Project > Build Environment this var QT_DEBUG_PLUGINS = 1 and work, returning this:

      http://pastebin.com/LVmLWASZ

      But it not show qtwebkitplugins.dll in the log.

      How can I solve this issue?

      QT project: https://github.com/brcontainer/qt-helper

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Just thought of something, why didn't you call mingw32-make install ?

        Also did you enable the plugins in the QWebSettings of your application ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        B 1 Reply Last reply
        0
        • SGaistS SGaist

          Just thought of something, why didn't you call mingw32-make install ?

          Also did you enable the plugins in the QWebSettings of your application ?

          B Offline
          B Offline
          brcontainer
          wrote on last edited by brcontainer
          #5

          @SGaist said:

          Just thought of something, why didn't you call mingw32-make install ?

          Also did you enable the plugins in the QWebSettings of your application ?

          Thank you for your dedication,

          How to call the mingw32-make install?

          QWebsettings:

          QWebSettings *settings = QWebSettings::globalSettings();
          settings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
          settings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true);
          settings->setAttribute(QWebSettings::LocalStorageEnabled, true);
          settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
          settings->setAttribute(QWebSettings::JavascriptCanCloseWindows, true);
          settings->setAttribute(QWebSettings::JavascriptEnabled, true);
          settings->setAttribute(QWebSettings::NotificationsEnabled, true);
          
          //Enable OpenGL/webGL
          settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true);
          settings->setAttribute(QWebSettings::WebGLEnabled, true);
          
          settings->setAttribute(QWebSettings::PluginsEnabled, true);
          settings->setAttribute(QWebSettings::JavaEnabled, false);
          
          settings->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
          
          settings->setAttribute(QWebSettings::AutoLoadImages, true);
          
          settings->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, true);
          settings->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true);
          
          settings->setAttribute(QWebSettings::DnsPrefetchEnabled, true);
          settings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, true);
          settings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, false);
          settings->setAttribute(QWebSettings::ScrollAnimatorEnabled, true);
          
          settings->setOfflineWebApplicationCachePath(pathApp + "appcache");
          settings->setOfflineStoragePath(pathApp + "offlinestorage");
          settings->setLocalStoragePath(pathApp + "storage");
          settings->setIconDatabasePath(pathApp + "icons");
          

          QT project: https://github.com/brcontainer/qt-helper

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            As silly as it may sound, just go in the same folder where you built the plugin and call mingw32-make install unless make has an other name on your system ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            B 1 Reply Last reply
            0
            • SGaistS SGaist

              As silly as it may sound, just go in the same folder where you built the plugin and call mingw32-make install unless make has an other name on your system ?

              B Offline
              B Offline
              brcontainer
              wrote on last edited by brcontainer
              #7

              @SGaist said:

              As silly as it may sound, just go in the same folder where you built the plugin and call mingw32-make install unless make has an other name on your system ?

              Makefile generated: http://pastebin.com/dNyYJLH6

              After I tried this command mingw32-make && mingw32-make install, return this:

              cd src\ && ( if not exist Makefile C:\Qt5.4.0\5.4\mingw491_32\bin\qmake.exe C:\projects\qtwebkit-plugins-master\src\src.pro -o Makefile ) && mingw32-make -f Makefile
              mingw32-make[1]: Entering directory 'C:/projects/qtwebkit-plugins-master/src'
              mingw32-make -f Makefile.Release
              mingw32-make[2]: Entering directory 'C:/projects/qtwebkit-plugins-master/src'
              g++ -Wl,-s -shared -Wl,-subsystem,windows -mthreads -Wl,--out-implib,C:\projects\qtwebkit-plugins-master\src..\bin\libqtwebkitplugins.a -o ..\bin\qtwebkitplugins.dll ../build/plugin.o ../build/spellcheck.o ../build/speller.o ../build/notificationpresenter.o ../build/qrc_notifications.o ../build/moc_qwebkitplatformplugin.o ../build/moc_plugin.o ../build/moc_spellcheck.o ../build/moc_notificationpresenter.o -lglu32 -lopengl32 -lgdi32 -luser32 -lhunspell -LC:/Qt5.4.0/5.4/mingw491_32/lib -lQt5Widgets -lQt5Gui -lQt5Network -lQt5Core
              mingw32-make[2]: Leaving directory 'C:/projects/qtwebkit-plugins-master/src'
              mingw32-make[1]: Leaving directory 'C:/projects/qtwebkit-plugins-master/src'
              cd src\ && ( if not exist Makefile C:\Qt5.4.0\5.4\mingw491_32\bin\qmake.exe C:\projects\qtwebkit-plugins-master\src\src.pro -o Makefile ) && mingw32-make -f Makefile install
              mingw32-make[1]: Entering directory 'C:/projects/qtwebkit-plugins-master/src'
              mingw32-make -f Makefile.Release install
              mingw32-make[2]: Entering directory 'C:/projects/qtwebkit-plugins-master/src'
              mingw32-make[2]: Nothing to be done for 'install'.
              mingw32-make[2]: Leaving directory 'C:/projects/qtwebkit-plugins-master/src'
              mingw32-make[1]: Leaving directory 'C:/projects/qtwebkit-plugins-master/src'

              I copied .dll and .a generated for mingw folder and tested my project with webview (with QT_DEBUG_PLUGINS = 1).

              If have focus in <input type="text"> or <textarea> or use Notification Web API Application output tab (in QtCreator) returns:

              Found metadata in lib C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll, metadata=
              {
                  "IID": "org.qtwebkit.QtWebKit.QtWebKitPlugin",
                  "MetaData": {
                  },
                  "className": "QtWebKitPlugin",
                  "debug": false,
                  "version": 328704
              }
              
              
              loaded library "C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll"
              QLibraryPrivate::unload succeeded on "C:/Qt5.4.0/5.4/mingw491_32/plugins/webkit/qtwebkitplugins.dll" 
              QSystemTrayIcon::setVisible: No Icon set
              

              It seems to me that the .dll is loaded, it just is not working. What did I do wrong?

              QT project: https://github.com/brcontainer/qt-helper

              1 Reply Last reply
              0
              • B Offline
                B Offline
                brcontainer
                wrote on last edited by brcontainer
                #8

                I solved

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

                Change this:

                QT_BEGIN_NAMESPACE
                Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
                

                By this:

                QT_BEGIN_NAMESPACE
                Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "org.qt-project.Qt.WebKit.PlatformPlugin/1.9");
                

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

                QT_BEGIN_NAMESPACE
                #if QT_VERSION >= 0x050200
                Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "org.qt-project.Qt.WebKit.PlatformPlugin/1.9")
                #else
                Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9")
                #endif
                QT_END_NAMESPACE
                

                I send a pull-request https://github.com/QupZilla/qtwebkit-plugins/pull/4 in repository

                QT project: https://github.com/brcontainer/qt-helper

                1 Reply Last reply
                1
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  Good catch !

                  Thanks for sharing your findings.

                  One last thing to do is mark the thread as solved so other forum users may know as solution has been found :)

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  B 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    Good catch !

                    Thanks for sharing your findings.

                    One last thing to do is mark the thread as solved so other forum users may know as solution has been found :)

                    B Offline
                    B Offline
                    brcontainer
                    wrote on last edited by
                    #10

                    @SGaist said:

                    One last thing to do is mark the thread as solved

                    How to do it? Nothing appears but the editing buttons and sharing on social networks.

                    Thanks.

                    QT project: https://github.com/brcontainer/qt-helper

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      Don't you have somewhere on the page a "Mark Solved" button ? Or Topic Tools -> Mark Solved ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      B 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Don't you have somewhere on the page a "Mark Solved" button ? Or Topic Tools -> Mark Solved ?

                        B Offline
                        B Offline
                        brcontainer
                        wrote on last edited by
                        #12

                        @SGaist No, I migrated my account "qt-project.org/" and I think merge it with the account that already existed in "qt.io", perhaps the account has not been fully active.

                        See images:

                        Alt text
                        Alt text

                        QT project: https://github.com/brcontainer/qt-helper

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          Strange… Let's check with @tekojo tomorrow

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          B 2 Replies Last reply
                          1
                          • SGaistS SGaist

                            Strange… Let's check with @tekojo tomorrow

                            B Offline
                            B Offline
                            brcontainer
                            wrote on last edited by
                            #14

                            @SGaist said:

                            Strange… Let's check with @tekojo tomorrow

                            Thanks!

                            QT project: https://github.com/brcontainer/qt-helper

                            1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Strange… Let's check with @tekojo tomorrow

                              B Offline
                              B Offline
                              brcontainer
                              wrote on last edited by
                              #15

                              @SGaist said:

                              Strange… Let's check with @tekojo tomorrow

                              I discovered, your account is moderator type (I think), my account is a normal user, so I'm not such a function, but @tekojo had an idea to use "tags" instead of this function, see: https://bugreports.qt.io/browse/QTWEBSITE-631

                              QT project: https://github.com/brcontainer/qt-helper

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved