0

I've pretty much tried every proposal on solving this question that's on the entire internet but to no avail.

I'm using Qtcreator 4.2.2 on Windows 10, trying to make a program that must use a webview (of any kind) -- so far, I've tried using the QWebView and QWebKit stuff but it consistently refuses to recognise that I have the modules installed. I've verified that the dll, header and .pri files do exist in the system. I've tried using the MSVC and MinGw compilers, all with the same result; if I add web* to the QT variable in the project file, qmake claims the modules do not exist. None of the web stuff appears in the UI designer; neither for regular forms nor for qml.

How do I fix this? Is there some magic stuff that I have to do, that's not documented anywhere or am I just blind?

Edit: I've successfully created a program using QtCreator packaged in Fedora 26, that uses QWebView.

Clearer
  • 2,166
  • 23
  • 38

1 Answers1

1

It has nothing to do with Qt Creator, it just depends on which Qt version you have.

First Qt WebKit is not distributed since Qt 5.6, it has been replaced by Qt WebEngine.

Qt WebEngine does not support MinGW, so you are required to use MSVC. (Looking at my Qt installation it seems it is also the case for WebView) See: http://doc.qt.io/qt-5/qtwebengine-platform-notes.html#windows

Finally, Qt WebEngine is displayed as an optional module in the Qt Maintenance Tool, so you need to explicitly select it.

Benjamin T
  • 8,120
  • 20
  • 37
  • I've tried using WebEngine and WebKit. To add to my perplexion, I've just found an example that uses WebEngine (in the example in qtcreator) that compiles just fine. I installed all the optional tools, just to make sure I didn't miss anything. – Clearer Apr 27 '17 at 09:15
  • If you want a more detail answer, tell us which Qt version you are using and give us a sample of your project file. – Benjamin T Apr 27 '17 at 09:20
  • I think the problem was more on my machine than anything else. I've had a lot of problems with this piece of crap microsoft surface pro that I'm forced to work on. Anyway, I reinstalled Qtcreator yet again and again, and now it's working just like it's supposed to. Also, I'm using 5.8. How i just need to figure out how to load HTTPS stuff. – Clearer Apr 27 '17 at 13:17