My Qt4 help file is garbage with Qt 5.6 - how do I get QtWebKit working with Qt 5.6?
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
class HelpViewer : public QWebView
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.
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?
@davidb Official 5.6.1 sources are at http://download.qt.io/community_releases/5.6/5.6.1/
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?
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:
- Verify I already had the dependencies listed at https://wiki.qt.io/Building_Qt_5_from_Git
- Download and unzip qtwebkit-opensource-src-5.6.1.zip from http://download.qt.io/community_releases/5.6/5.6.1/
- Rename to "qtwebkit" and copy into my Qt 5.6.1-1 source tree
- 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
- cd to qtwebkit
- 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.
- With Qt Creator 4.1.0, I opened qttools\src\assistant\assistant\assistant.pro (not qttools\src\assistant\assistant.pro), configured for release.
- In the menu, Build..Clean All
- Build..Run qmake
- Build..Rebuild All
That did it! Now Assistant correctly displays my help file, instead of the gobbledygook it was displaying without qtwebkit.
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?
@HappyCoder Last line of your log tells what you have to do
@HappyCoder Ah, this is windows. Point SQLITE3SRCDIR variable to sqlite3.c file which you can find inside qtbase
If you are using VS2015 you can alternatively use binaries from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp3