Results 1 to 3 of 3

Thread: QPrintPreviewDialog.

  1. #1
    Join Date
    Jun 2008
    Location
    Rome, Italy
    Posts
    95
    Thanks
    19
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QPrintPreviewDialog.

    Hi to all,
    how can I run a QPrintPreviewDialog "maximized" and "Fit To Width" (without create a my own QPrintPreviewWidget) ?
    thanks!!!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QPrintPreviewDialog.

    Hi,

    you could use:
    Qt Code:
    1. QPrintPreviewDialog dlg(&printer, this);
    2. dlg.showMaximized();
    3. QList<QPrintPreviewWidget *> list = dlg.findChildren<QPrintPreviewWidget *>();
    4. if(!list.isEmpty()) // paranoiac safety check
    5. list.first()->setZoomMode(QPrintPreviewWidget::FitToWidth);
    To copy to clipboard, switch view to plain text mode 

    Lykurg

  3. The following user says thank you to Lykurg for this useful post:

    cydside (19th June 2009)

  4. #3
    Join Date
    Jun 2008
    Location
    Rome, Italy
    Posts
    95
    Thanks
    19
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QPrintPreviewDialog.

    Great!!!!!!!!!!!!!!!!!!!
    Please Lykurg send me your snapshot, I will replace the one on my desktop

    Thanks!

Similar Threads

  1. Pratical example of QPrintPreviewDialog
    By vcp in forum Qt Programming
    Replies: 5
    Last Post: 24th July 2012, 16:24
  2. QPrintPreviewDialog icons
    By quipu5 in forum Qt Programming
    Replies: 0
    Last Post: 19th January 2009, 13:36
  3. Qt 4.4.0 Problem with QPrintPreviewDialog
    By ad5xj in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2008, 14:01

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.