Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtWebKit depends on QtQml?
Qt 6.11 is out! See what's new in the release blog

QtWebKit depends on QtQml?

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 2 Posters 2.4k Views 1 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.
  • S Offline
    S Offline
    stephenju
    wrote on last edited by
    #1

    We are migrating from Qt 4.8 to Qt 5.2. Just find out QtWebKit now links against QtDeclarative which in turn depends on QtQuick, which depends on QtQml.

    We do widgets only applications and don't want to include all the libraries that we don't use. Is there a way to remove QtQuick and QtQml from the loop?

    Thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kevin0722
      wrote on last edited by
      #2

      I just migrated from Qt 4.8 to 5.2 as well. Yes, QtWebKit is now consist of webkit1 (c++) and webkit2 (qml).

      Haven't done this myself, but if you are looking for places to start:

      qtwebkit/Tools/qmake/mkspecs/features/configure.prf
      remove "build_webkit2 "
      and recompile QtWebkit

      Try this at your own risk. =D

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stephenju
        wrote on last edited by
        #3

        Thanks a lot. I will give it a try.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stephenju
          wrote on last edited by
          #4

          It works. QtWebKit no longer depends on QtQml or QtQuick. But QtWebKitWidgets still links against them. :(

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kevin0722
            wrote on last edited by
            #5

            Did you build from a complete fresh checkout or you modify something you already compiled? I am new to building Qt library so I am learning as well. Take my comment with as is.

            What I found is Qt 5.2 compiled tree does not respond to changes properly. Often time I need to do a fresh checkout, patch source, and compile from top of tree for changes to propagate properly. (Make a copy of fresh checkout and clone it.)

            One possibility is your change did not propagate/detect by QtWebkitWidgets. A fresh checkout, patch, and compile might do.

            Good luck.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              stephenju
              wrote on last edited by
              #6

              It turns out QtWebKitWidget build script checks for the existence of QtQuick module and link against it if it's present. It ignores the fact the webkit2 is not built.

              I had to comment out the addModule line for QtDeclarative and change QtWebKit to depend on QtBase in Qt.pro. This gives me QtQml and QtQuick free Qt libraries, on the Mac at least.

              Thanks for the help. I really appreciate it.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kevin0722
                wrote on last edited by
                #7

                Wow, you figured all this in 12 hours. Very nice progress.

                I got curious and checked out what you said. For others information, I believe the following is where Stephen made changes.

                qt.pro change to
                addModule(qtwebkit, qtbase, qtlocation qtsensors, WebKit.pro)

                widgetsapi.pri remove
                have?(QTQUICK): QT += quick

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  stephenju
                  wrote on last edited by
                  #8

                  Also removed/commented the line addModule(qtdeclarative, ...

                  1 Reply Last reply
                  0

                  • Login

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