Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. My Qt4 help file is garbage with Qt 5.6 - how do I get QtWebKit working with Qt 5.6?
Forum Updated to NodeBB v4.3 + New Features

My Qt4 help file is garbage with Qt 5.6 - how do I get QtWebKit working with Qt 5.6?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
11 Posts 4 Posters 3.6k Views 3 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.
  • D Offline
    D Offline
    davidb
    wrote on last edited by
    #1

    Re: Assistant html style issue

    My help file looked fine with Qt 4.8, but with Qt 5.6 it's terrible. Apparently this is due to the absence of QtWebKit in Qt 5.6.

    As @SGaist mentioned, building QtWebKit from sources and hooking it up to Qt 5.6 Assistant seems like the answer (if not, please suggest a better solution!) So, how do I do that? Specifically:

    • Where should I get the QtWebKit sources from?
    • How do I build the QtWebKit module?
    • Is there anything more to hooking my built QtWebKit module up to Qt 5.6 Assistant than replacing
    #if defined(BROWSER_QTWEBKIT)
    class HelpViewer : public QWebView
    #elif defined(BROWSER_QTEXTBROWSER)
    class HelpViewer : public QTextBrowser
    #endif
    

    with

    class HelpViewer : public QWebView
    

    ?

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

      Hi,

      AFAIK, the QtWebKit sources are provided with the 5.6 package, so you can build that one.

      As for building, you can find the "build dependencies" here. Once you have them, it's the classic:

      cd qtwebkit
      qmake
      make 
      make install
      

      Otherwise, the easy solution would be to use the 4.8 Assistant for the documentation.

      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
      • D Offline
        D Offline
        davidb
        wrote on last edited by
        #3

        Thanks! I'd rather not have to distribute the Qt4 files as well as the Qt5 files if I can fairly easily avoid it. But it appears qtwebkit is no longer part of the tree. I downloaded Qt 5.6.1-1 source as a single file, but qtwebkit wasn't included. I checked here: http://download.qt.io/archive/qt/5.6/5.6.1-1/submodules/ but can't find it.

        So, where would I get it? Or is there simply no version of qtwebkit that would work with 5.6.1-1?

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

          You can clone it from git at code.qt.io or there's also the QtWebKit reboot from @Konstantin-Tokarev.

          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
          0
          • D davidb

            Thanks! I'd rather not have to distribute the Qt4 files as well as the Qt5 files if I can fairly easily avoid it. But it appears qtwebkit is no longer part of the tree. I downloaded Qt 5.6.1-1 source as a single file, but qtwebkit wasn't included. I checked here: http://download.qt.io/archive/qt/5.6/5.6.1-1/submodules/ but can't find it.

            So, where would I get it? Or is there simply no version of qtwebkit that would work with 5.6.1-1?

            K Offline
            K Offline
            Konstantin Tokarev
            wrote on last edited by
            #5

            @davidb Official 5.6.1 sources are at http://download.qt.io/community_releases/5.6/5.6.1/

            1 Reply Last reply
            0
            • D Offline
              D Offline
              davidb
              wrote on last edited by
              #6

              Thanks to the guidance of @SGaist and @Konstantin-Tokarev I've added the qtwebkit source to my Qt 5.6.1 source tree. qtwebkit is building now.

              When qtwebkit finishes building, how do I rebuild Assistant so assistant uses qtwebkit?

              Also, is the normative way to use qtwebkit for Assistant to put the qtwebkit source into the Qt tree BEFORE configuring and building Qt? If so, what configure option tells qt to use qtwebkit for assistant? Or is simply the presence of the qtwebkit directory all that is necessary?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                davidb
                wrote on last edited by
                #7

                It works! Thanks so much! What I did, in case it will help someone else:

                I already had Qt 5.6.1-1 built on a Windows machine. Starting from there:

                1. Verify I already had the dependencies listed at https://wiki.qt.io/Building_Qt_5_from_Git
                2. Download and unzip qtwebkit-opensource-src-5.6.1.zip from http://download.qt.io/community_releases/5.6/5.6.1/
                3. Rename to "qtwebkit" and copy into my Qt 5.6.1-1 source tree
                4. Launch a command prompt from a link created according to instructions at http://doc.qt.io/qt-5/windows-building.html#step-3-set-the-environment-variables
                5. cd to qtwebkit
                6. qmake
                7. nmake (since I'm on Windows)
                  That build successfully in 2 hours 20 minutes on a Win 8.1 x64 vm with 4 GB RAM and 8 processors, running on a 2012 MacBook Pro.
                8. With Qt Creator 4.1.0, I opened qttools\src\assistant\assistant\assistant.pro (not qttools\src\assistant\assistant.pro), configured for release.
                9. In the menu, Build..Clean All
                10. Build..Run qmake
                11. Build..Rebuild All

                That did it! Now Assistant correctly displays my help file, instead of the gobbledygook it was displaying without qtwebkit.

                1 Reply Last reply
                1
                • H Offline
                  H Offline
                  HappyCoder
                  wrote on last edited by
                  #8

                  I tried to build qtwebkit, but i got this error message:

                  Running configure tests...

                  Checking for fontconfig... no
                  Checking for gccdepends... no
                  Checking for glx... no
                  Checking for gnuld... yes
                  Checking for icu... no
                  Checking for leveldb... no
                  Checking for libsqlite3... no
                  Checking for libwebp... no
                  Checking for libXcomposite... no
                  Checking for libxml2... no
                  Checking for libXrender... no
                  Checking for libxslt... no
                  Checking for libzlib... yes
                  Project ERROR: WebKit requires SQLite. Either make it available via pkg-config, set $SQLITE3SRCDIR or build WebKit under qt5.git.

                  I don't see SQLite in dependencies? What's wrong here?

                  K 2 Replies Last reply
                  0
                  • H HappyCoder

                    I tried to build qtwebkit, but i got this error message:

                    Running configure tests...

                    Checking for fontconfig... no
                    Checking for gccdepends... no
                    Checking for glx... no
                    Checking for gnuld... yes
                    Checking for icu... no
                    Checking for leveldb... no
                    Checking for libsqlite3... no
                    Checking for libwebp... no
                    Checking for libXcomposite... no
                    Checking for libxml2... no
                    Checking for libXrender... no
                    Checking for libxslt... no
                    Checking for libzlib... yes
                    Project ERROR: WebKit requires SQLite. Either make it available via pkg-config, set $SQLITE3SRCDIR or build WebKit under qt5.git.

                    I don't see SQLite in dependencies? What's wrong here?

                    K Offline
                    K Offline
                    Konstantin Tokarev
                    wrote on last edited by
                    #9

                    @HappyCoder Last line of your log tells what you have to do

                    1 Reply Last reply
                    1
                    • H HappyCoder

                      I tried to build qtwebkit, but i got this error message:

                      Running configure tests...

                      Checking for fontconfig... no
                      Checking for gccdepends... no
                      Checking for glx... no
                      Checking for gnuld... yes
                      Checking for icu... no
                      Checking for leveldb... no
                      Checking for libsqlite3... no
                      Checking for libwebp... no
                      Checking for libXcomposite... no
                      Checking for libxml2... no
                      Checking for libXrender... no
                      Checking for libxslt... no
                      Checking for libzlib... yes
                      Project ERROR: WebKit requires SQLite. Either make it available via pkg-config, set $SQLITE3SRCDIR or build WebKit under qt5.git.

                      I don't see SQLite in dependencies? What's wrong here?

                      K Offline
                      K Offline
                      Konstantin Tokarev
                      wrote on last edited by
                      #10

                      @HappyCoder Ah, this is windows. Point SQLITE3SRCDIR variable to sqlite3.c file which you can find inside qtbase

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        Konstantin Tokarev
                        wrote on last edited by
                        #11

                        If you are using VS2015 you can alternatively use binaries from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp3

                        1 Reply Last reply
                        1

                        • Login

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