Results 1 to 2 of 2

Thread: qwebview loading html from resource

  1. #1
    Join Date
    Sep 2012
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qwebview loading html from resource

    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?

  2. #2
    Join Date
    Jul 2012
    Posts
    123
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qwebview loading html from resource

    Try setHTML()

Similar Threads

  1. Loading images from resource files in webkit
    By redserpent7 in forum Qt Programming
    Replies: 1
    Last Post: 21st January 2015, 13:01
  2. Replies: 0
    Last Post: 25th September 2012, 11:44
  3. QFontDatabase loading font from resource
    By myrky in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2010, 12:50
  4. Error when loading QIcon from plugin resource on mac
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 12th February 2010, 01:29
  5. Dynamic resource loading not work in another computer
    By GRUB in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd September 2007, 10:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.