Visual C++ 2017 + Qt5 - can't enable webkit in Qt Project Settings

1.4k views Asked by At

When I try to include WebKit Libraries in MSVC 2017 "WebKit" and "WebKit Widgets" checkboxes are disabled, even though I've selected them to be installed.

enter image description here

I've tried different versions of Qt from 5.6 to 5.9beta.

Has anyone seen this problem before?

2

There are 2 answers

0
eyllanesc On BEST ANSWER

The Qt webkit module is no longer available in Qt5, you must use the Qt WebEngine module, the following link shows the Qt official documentation procedure: http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html

1
Dushan Savich On

As @eyllanesc has suggested, I should have just checked the portability guide:

http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html

There are a couple of more things worth noting for everyone who tries to use Qt on Visual Studio 2017:

  • You should use version 5.9
  • Make sure to add all of the library and include paths manually
  • If linker starts screeching that it can't find any webkit classes, add Qt5WebEngine(d)*.lib libraries manually to the project (Qt5WebEngineWidgets(d).lib , Qt5WebEngined.lib etc. (use the lib files with the "d" at the end of the name if you're using the debug version)
  • Make sure you've selected version 5.9 in QtVSTools -> Qt Options as a defeault Qt version, and make sure you have that version selected in your QtVsTools -> Qt Project Settings