PDA

View Full Version : qwebview loading html from resource



sawarsi
31st January 2013, 18:03
hi,

i am trying to load a qwebview with the following code:

webView->setUrl(QUrl("qrc:/html/test.html");

and the QWebView is showing the raw html such as :

<!--?xml version="1.0" encoding="iso-8859-1"?-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Portal</title>
<meta name="description" content="Portal - customer portal ">

<meta name="generator" content="Bluefish 2.2.2" >
<meta name="robots" content="index, follow">
<!-- base href="http://www.mydomain.com/" -->
<link rel="shortcut icon" href="http://www.mydomain/images/favicon.ico">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" >
<link href="Portal_files/template_css.css" rel="stylesheet" type="text/css">
</head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
...

what could i possibly be doing wrong?

Viper666
31st January 2013, 18:15
Try setHTML()