简体   繁体   English

使QtWebKit在Qt Creator中工作

[英]Getting QtWebKit working in Qt creator

I have installed the Qt SDK and I am trying to make a basic web browser using their supposed QtWebKit though it's not in the include list and I am not sure how to include the relevant header/includes to get this show on the road? 我已经安装了Qt SDK,并且尝试使用其假定的QtWebKit制作基本的Web浏览器,尽管它不在包含列表中,而且我不确定如何包含相关的标头/包含项才能在旅途中展示此内容?

Build error: "Cannot open include file: 'QtWebKit': No such file or directory". 生成错误:“无法打开包含文件:'QtWebKit':无此类文件或目录”。

Sorry if this is a basic question but I don't have much experience with C++. 抱歉,如果这是一个基本问题,但我对C ++的经验不足。

By default, webkit is not included. 默认情况下,不包含webkit。

If using qmake, you should add this line to the .pro file. 如果使用qmake,则应将此行添加到.pro文件中。

QT += network webkit

To anyone using Qt 5 or recently releases. 对于使用Qt 5或最新版本的任何人。 This has slightly changed. 这有一点改变。

You now need to add webkitwidgets to your .pro file. 现在,您需要将webkitwidgets添加到.pro文件中。 Here's what mine looks like 这是我的样子

QT += core gui webkitwidgets

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

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