Results 1 to 4 of 4

Thread: I'm printing blank pages with QWebView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Unhappy I'm printing blank pages with QWebView

    Hello everybody,

    I'm trying to print a HTML page from QWebView but it always prints nothing but an
    empty page

    Qt Code:
    1. Test::Test(QObject* parent):QObject(parent)
    2. {
    3. view = new QWebView;
    4. view->load(QUrl("page.html"));
    5. view->show();
    6. connect(view,SIGNAL(loadFinished(bool)),this,SLOT(loadFinished()));
    7. }
    8.  
    9. void Test::loadFinished()
    10. {
    11. qDebug()<<"load finished";
    12. QPrinter printer;
    13. QPrintDialog dialog(&printer);
    14. dialog.exec();
    15. view->print(&printer);
    16. }
    To copy to clipboard, switch view to plain text mode 


    Can any one help me with this problem
    Last edited by ihs280; 30th May 2011 at 16:03.

Similar Threads

  1. Replies: 2
    Last Post: 16th April 2014, 04:26
  2. Replies: 2
    Last Post: 14th April 2011, 17:37
  3. QWebView showing blank pages.
    By gontham in forum Qt Programming
    Replies: 1
    Last Post: 26th May 2010, 10:02
  4. QWebView not loading pages
    By magland in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2008, 14:41
  5. QWizard with QWizardPages gives blank pages?
    By Tiansen in forum Qt Programming
    Replies: 4
    Last Post: 4th March 2008, 06:45

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
  •  
Qt is a trademark of The Qt Company.