Results 1 to 3 of 3

Thread: How to use Qt print preview?

  1. #1
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default How to use Qt print preview?

    hi all.

    i use Print Preview , but I found some problems , I could not resolve this.

    problem 1:
    i use QPrintPreviewDialog has toolbar(Qt Provide), but i do not want run modally .
    so i use QPrintPreviewWidget , this is not modal , but I can't find toolbar ,This makes me very disappointed.

    problem 2:
    how to set page width scale PrintPreview window width ? in QPrintPreviewDialog toolbar , i found "fit the page width" button ,but i don't know call in code.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to use Qt print preview?

    1. If you don't want a modal dialog then call show() instead of exec()
    2. QPrintPreviewWidget::setZoomMode()
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

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

    tiaoweiliao (7th June 2016)

  4. #3
    Join Date
    Apr 2016
    Posts
    37
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to use Qt print preview?

    thx , I seriously do not before. i use dialog show() is work.

Similar Threads

  1. Print preview of a QWidget
    By Ponnytail in forum Newbie
    Replies: 5
    Last Post: 4th December 2013, 22:10
  2. Print preview on QGraphicsItem
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 13th April 2012, 05:25
  3. Print preview for Qt activex
    By sowmya in forum Qt Programming
    Replies: 0
    Last Post: 19th July 2010, 10:53
  4. print preview
    By wbt_ph in forum Qt Programming
    Replies: 4
    Last Post: 1st August 2009, 06:41
  5. Cancelling Long-running Print/Print Preview
    By ChrisW67 in forum Newbie
    Replies: 4
    Last Post: 16th June 2009, 23:05

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.