Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在qt中的Qwebview中调用URL?_Qt - Fatal编程技术网

如何在qt中的Qwebview中调用URL?

如何在qt中的Qwebview中调用URL?,qt,Qt,我的程序中有一个qwebview,名称为websitecaller 我只想调用webview{websitecaller} 我正在使用的代码 QUrl url="http://www.google.com"; ui->websitecaller->load(url); 导致以下错误 error: conversion from ‘const char [46]’ to non-scalar type ‘QUrl’ requested 如何解决此问题?更改 QUrl url="ht

我的程序中有一个qwebview,名称为
websitecaller

我只想调用
webview{websitecaller}

我正在使用的代码

QUrl url="http://www.google.com";
ui->websitecaller->load(url);
导致以下错误

error: conversion from ‘const char [46]’ to non-scalar type ‘QUrl’ requested
如何解决此问题?

更改

QUrl url="http://www.google.com";

改变


你真的应该读这篇文章:你真的应该读这篇文章:非常感谢你,克里斯。我经历了“知道我犯了什么错误”…非常感谢你,克里斯。我经历了“知道我犯了什么错误”…非常感谢
QUrl url("http://www.google.com");