简体   繁体   English

尝试运行 SimpleBrowser 示例时,在 Qt Creator 中出现错误“QT 中的未知模块:定位”

[英]Getting the error "Unknown module in QT: positioning" in Qt Creator, when trying to run the SimpleBrowser example

I bought and downloaded QtCreator and I'm trying to run the SimpleBrowser example: https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.html我购买并下载了 QtCreator,我正在尝试运行 SimpleBrowser 示例: https://doc.qt.io/qt-5/qtwebengine-webenginewidgets-simplebrowser-example.https:

When I build the project I get the error:当我构建项目时,我收到错误:

Unknown module in QT: positioning

I think the reason might be that I bought the Design Tools version of Qt Creator, and this module is not included in the Design Tools purchase.我想原因可能是我购买了 Qt Creator 的设计工具版本,而这个模块不包含在设计工具购买中。

Is this the reason for my error message?这是我的错误消息的原因吗? If I buy the Development Tools version of Qt Creator, will the error go away, and will my environment have the Qt WebEngine C++ classes, along with all it needs to build the SimpleBrowser example? If I buy the Development Tools version of Qt Creator, will the error go away, and will my environment have the Qt WebEngine C++ classes, along with all it needs to build the SimpleBrowser example?

I tried adding Qt += positioning to my project file and it doesn't make a difference.我尝试将 Qt += 定位添加到我的项目文件中,但没有任何区别。 Here is the project file:这是项目文件:

QT += core gui
QT += positioning
QT += webenginewidgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11

HEADERS += \
    browser.h \
    browser.h \
    browserwindow.h \
    browserwindow.h \
    downloadmanagerwidget.h \
    downloadmanagerwidget.h \
    downloadwidget.h \
    downloadwidget.h \
    tabwidget.h \
    tabwidget.h \
    webpage.h \
    webpage.h \
    webpopupwindow.h \
    webpopupwindow.h \
    webview.h \
    webview.h

SOURCES += \
    browser.cpp \
    browser.cpp \
    browserwindow.cpp \
    browserwindow.cpp \
    downloadmanagerwidget.cpp \
    downloadmanagerwidget.cpp \
    downloadwidget.cpp \
    downloadwidget.cpp \
    main.cpp \
    tabwidget.cpp \
    tabwidget.cpp \
    webpage.cpp \
    webpage.cpp \
    webpopupwindow.cpp \
    webpopupwindow.cpp \
    webview.cpp \
    webview.cpp

FORMS += \
    certificateerrordialog.ui \
    certificateerrordialog.ui \
    downloadmanagerwidget.ui \
    downloadwidget.ui \
    passworddialog.ui \
    passworddialog.ui \
    downloadmanagerwidget.ui \
    downloadwidget.ui

RESOURCES += data/simplebrowser.qrc

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

What a coincidence, we're trying to open the same project.多么巧合,我们正试图打开同一个项目。 I solved it by actually installing the QPositioning module using the maintenance.exe in the Qt Installation Folder (Typically in C:\Qt).我通过使用 Qt 安装文件夹(通常在 C:\Qt)中的 maintenance.exe 实际安装QPositioning模块解决了这个问题。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM