标题:求助,QWebEngineView加载离线地图html文件。
作者:automoblie0
日期:2020-05-28 10:56
内容:
求助,QWebEngineView加载离线地图html文件时,如下代码已经将离线地图地址加入进来了。
这个test111.html在网页下打开是正常显示离线地图内容。
QString htmlPath = QCoreApplication::applicationDirPath() + "/_GoogleMapAPI3/test111.html";
但在为什么Qt界面上显示却是空的瓦片,并且连google的logo都是问号的图标。
感觉像是资源没有加入进来,求助该如何处理。拜托大家
#1 [maxlogo 05-28 11:04]
前面还要加file:///
#2 [automoblie0 05-28 11:12]
你好,我这个已经加过了。。还是之前的问题。。
QString htmlPath = QCoreApplication::applicationDirPath() + "/GoogleMapAPI3/test111.html";
qDebug() setWebChannel(WebChannel);
ui->WebEngineView->setPage(WebEnginePage);