Results 1 to 2 of 2

Thread: qwebview not display image

  1. #1
    Join Date
    Nov 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default qwebview not display image

    Hello, using qwevview.

    If i load image from web (for example http://www.google.com) i can see image on site,
    but if i load local site (file://...) i can not see image on my local site, i dont understand why. Execute this project on two OS (MAC and PC), mac project is work, PC not work.

    The code:
    Qt Code:
    1. QWebView *view;
    2. view = new QWebView(this);
    3. if (MAC)
    4. {
    5. view->load(QUrl("file://" + path.left(i) + "iWeb/Pages/index_MAC.html"));
    6. }
    7. else
    8. {
    9. view->load(QUrl(path.left(i).replace(QRegExp("/"),"\\\\") + "iWeb\\\\Pages\\\\index_PC.html"));
    10. }
    11.  
    12. view->show();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Nov 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Smile Re: qwebview not display image

    use qurl::fromlocalfile

Similar Threads

  1. Parse RSS into html and display it in QWebView.
    By halvors in forum Qt Programming
    Replies: 11
    Last Post: 14th August 2010, 12:44
  2. Html page Display in QWebView
    By Tavit in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2010, 15:39
  3. QWebView problem to display the web page
    By ansar in forum Qt Programming
    Replies: 4
    Last Post: 2nd March 2010, 12:36
  4. Reg QWebview Display
    By Tavit in forum Qt Programming
    Replies: 0
    Last Post: 5th August 2009, 15:19
  5. How to display xml file in qwebview?
    By richardander in forum Qt Programming
    Replies: 2
    Last Post: 31st May 2009, 21:10

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.