Results 1 to 8 of 8

Thread: The content doesn't show to preview when using QPrintPreviewDialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2013
    Posts
    6
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Windows

    Default Re: The content doesn't show to preview when using QPrintPreviewDialog

    I also used QPrintDialog object that you had mentioned. The preview content appeared well for the first time. But I couldn't get actions such as Zoom in, Zoom out, Fit width, Fit page....like QPrintPreviewDialog object. I have not solved this issue yet. Maybe I need to research deeply about Qt. Anyway, thanks for your help!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: The content doesn't show to preview when using QPrintPreviewDialog

    You should first setup the printer using the printer dialog and then call the preview dialog. It's not that you should use one instead of the other.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jul 2013
    Posts
    6
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Windows

    Default Re: The content doesn't show to preview when using QPrintPreviewDialog

    Quote Originally Posted by wysota View Post
    You should first setup the printer using the printer dialog and then call the preview dialog. It's not that you should use one instead of the other.
    Could you show me some sample code to solve this issue? It will help me save a lot of working in this case. I researched documents and technologies that followed your instruction but I still didn't solve this issue

  4. #4
    Join Date
    Jul 2013
    Posts
    6
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Windows

    Default Re: The content doesn't show to preview when using QPrintPreviewDialog

    Hi all,

    Finally I have solved my issue. I have just removed the following code

    Qt Code:
    1. printer.setResolution(QPrinter::HighResolution);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. qgraphicsview can't preview by QPrintPreviewDialog
    By qylibohao in forum Qt Programming
    Replies: 1
    Last Post: 4th November 2011, 07:46
  2. QGraphicsTextItem doesn't show up
    By chapu in forum Qt Programming
    Replies: 6
    Last Post: 12th July 2010, 00:48
  3. Replies: 1
    Last Post: 11th June 2010, 09:47
  4. Read SMS in-box content & show it in QListWidget?
    By damodharan in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2010, 05:51
  5. Replies: 12
    Last Post: 15th February 2006, 10:46

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.