Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个新的 Qt5 项目。我所做的只是将 QWebView 拖到我的 MainWindowUI 中。它给了我这些错误:
error: undefined reference toimp __ZN8QWebViewC1EP7QWidget'`
error: undefined reference to
和
error: undefined reference toimp __ZN8QWebView6setUrlERK4QUrl`
我什至没有写过一行代码!QtDesigner 有问题吗?
在 pro 文件中添加“webkit”(直到 Qt 4.7.4)或 webkitwidgets(Qt5)。像“QT += core gui webkit”,然后清理并构建。