[Solved] [Linux] Unknown module(s) in QT: webkitwidgets



  • Hi,

    I know this question is not new, but I coundn't find an answer that helps me.

    OS: Linux Mint
    Qt: 5.3.0
    Qt Creator: 3.1.81

    I downloaded Qt and compiled it with
    ./init-repository
    ./configure -developer-build
    make

    I downloaded Qt Creator and compiled it with
    qmake qtcreaotr.pro -recursive
    make

    Then in Qt Creator I set the path to the compiled qmake, for example:
    /home/dev/qt5.3.0/qtbase/bin/qmake

    When I add to the *.pro file QT += webkitwidgets it says
    Project ERROR: Unknown module(s) in QT: webkitwidgets

    -Maybe I don't have some packages installed, but I don't know which.-

    Edit: I have to correct myself. I have two Qt Creator versions. One, let's call it A, I installed with the online installer, and one, let's call it B, I compiled myself as described before. Qt Creator A recognizes the WebKit, if i point it to its qmake. But Qt Creator B cannot find it.

    Maybe I must make some configuration to compile Qt with WebKit or point Qt Creator B to the WebKit.



  • Hi, you should use QT += webkit



  • This gives me the same error.
    Project ERROR: Unknown module(s) in QT: webkit



  • Did you #include <QtWebKitWidgets>
    or - with QT += webkit #include <QtWebKit>

    EDIT:
    check if libqt5webkit is installed
    sudo apt-get install libqt5webkit5-dev



  • I updated my original post.

    Only the Qt Creator that I compiled myself can not find WebKit. The other Qt Creator, that I installed with the online installer, has no problems. So the problem is not the missing packages, but maybe how I compiled or configured my Qt Creator.

    It's no use to try #include <QtWebKitWidgets> or #include <QtWebKit> when the WebKit can not be found by Qt Creator, and neither QT += webkit, nor QT += webkitwidgets work.



  • I've read your updated post and again read through the Qt Doc. I agree it must be an issue with compiling! Good luck!



  • Ok, I solved the problem with the help of a guy from the #qt IRC channel.

    It seems that the module qtwebkit isn't built while compiling Qt. To compile qtwebkit change into directory qtwebkit:

    • cd <qt path>/qtwebkit

    Create/configure Makefile:

    • ../qtbase/bin/qmake

    Compile qtwebkit:

    • make

    I don't know whether the missing compilation of qtwebkit is the expected behaviour.

    PS: Compilation of qtwebkit takes a half hour on i7-4770k.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.