Results 1 to 2 of 2

Thread: QWebView Images with UNC path not working

  1. #1
    Join Date
    Dec 2010
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QWebView Images with UNC path not working

    In the following application:

    Qt Code:
    1. #include <QApplication>
    2. #include <QHBoxLayout>
    3. #include <QWebView>
    4.  
    5. int main(int argc, char* argv[])
    6. {
    7. QApplication app(argc, argv);
    8. QWidget *window = new QWidget();
    9.  
    10. window->setLayout(new QHBoxLayout());
    11. window->resize(800, 600);
    12. window->show();
    13.  
    14. QWebView *webView = new QWebView(window);
    15. window->layout()->addWidget(webView);
    16.  
    17. webView->load(QUrl("C:/test.html"));
    18.  
    19. return app.exec();
    20. }
    To copy to clipboard, switch view to plain text mode 
    where test.html is:

    Qt Code:
    1. <html>
    2. <head></head>
    3. <body>
    4. <img src="file://///SERVER/path/image.png">
    5. <img src="file:///C:/test.png">
    6. </body>
    7. </html>
    To copy to clipboard, switch view to plain text mode 

    Qt 4.5.1 shows me nothing at all (Not even the "image missing" images).
    Qt 4.7.1 show me the local file ("test.png"), but an "image missing" image for the file on the network share.

    The html file loads fine with both images in Firefox, Chrome and IE.

    What could be the problem here? Are the URLs correct? Could it be an issue with access rights? I'm really out of ideas, any help would be much appreciated.

    Thanks
    Michael

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    84
    Thanks
    7
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView Images with UNC path not working

    same problem here!
    any ideas anyone?

    best regards,
    jh

Similar Threads

  1. QWebview not showing images
    By manojmka in forum Qt Programming
    Replies: 27
    Last Post: 17th July 2012, 00:22
  2. QWebView with .css, .js and images in a resource file...
    By sublimer in forum Qt Programming
    Replies: 1
    Last Post: 14th September 2010, 13:27
  3. Get images from a QWebView or QWebPage
    By redneon in forum Qt Programming
    Replies: 6
    Last Post: 21st January 2010, 10:03
  4. QWebView not displaying images
    By andyp in forum Qt Programming
    Replies: 7
    Last Post: 3rd December 2009, 22:35
  5. QWebView shows '?' instead of all images
    By doep in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2009, 11:03

Tags for this Thread

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.