Qt-QWebEngineView显示百度网页
版本:Qt5.14
1、.pro
QT += webenginewidgets
2、头文件
#include <QWebEngineView>
3、代码
int main(int argc, char *argv[]){ QApplication a(argc, argv); QWebEngineView *view = new QWebEngineView(); view->load(QUrl("https://www.baidu.com/")); view->show(); return a.exec(); }
PS:
如果想实现通信则用QWebChannel :https://www.cnblogs.com/sigma0/p/7346727.html
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html