yamuna mathew
yamuna mathew

Reputation: 1079

How can I call a URL in Qwebview in qt?

I have a qwebview in my program with the name websitecaller.
I just want to call http://google.com to that webview{websitecaller}.

The code I am using

QUrl url="http://www.google.com";
ui->websitecaller->load(url);

results in the following error

error: conversion from ‘const char [46]’ to non-scalar type ‘QUrl’ requested

How can I fix this?

Upvotes: 0

Views: 1896

Answers (1)

Chris
Chris

Reputation: 17535

Change

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

to

QUrl url("http://www.google.com");

Upvotes: 4

Related Questions