Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. CMake and QT WebKit Compile
QtWS25 Last Chance

CMake and QT WebKit Compile

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 1 Posters 4.0k Views
  • 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.
  • B Offline
    B Offline
    brucechidester
    wrote on last edited by
    #1

    When I include QT += webkit in a project file and use qmake, a QWebView example works great and as expected. When attempting to add "set(QT_USE_QTWEBKIT TRUE)" to my CMakeList.txt, I get the issue:

    "Qt QTXMLPATTERNS library not found."

    I have tried adding set(QT_USE_QTXMLPATTERNS TRUE) to address this, but no change. A post on another site suggested there is an un-neccessary dependency for WebKit to have on XmlPatterns.

    Since the qmake version works and the cmake version does not, the module must be available to be loaded.

    Any hint on the solution or troubleshooting steps to fix this? A CMake example?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brucechidester
      wrote on last edited by
      #2

      A work-around does exist...but does not explain the issue. It appears that the CMake solution does have an un-necessary dependency on XML Patterns, an illustrated in the work-around.
      (Work Around)
      Two changes from working examples:

      1. Find the webkit on your system. i.e. instead of #include <QWebView>, mine was #include <QtWebKit/QWebView>.
      2. Specify on the link line "-l QtWebKit" or in a target_link_libraries() operation, add "QtWebKit", do not add "set(QT_USE_QTWEBKIT TRUE)"
      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