Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Add QComboBox to QPrintPreviewDialog toolbar

Add QComboBox to QPrintPreviewDialog toolbar

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hareen Laks
    wrote on last edited by
    #1

    Hi all,

    I have created a QPrintPreviewDialog as below code.

    @ void showPrintPreview()
    {
    AppSettings settings;
    QPrinter printer;
    QPrintPreviewDialog preview( &printer );
    printer.setOrientation(settings.printerPaperOrientation());
    printer.setPaperSize(settings.printerPaperSize());
    connect(&preview,SIGNAL(paintRequested(QPrinter*)),this,SLOT(drawViewOnPrinter(QPrinter*)));
    preview.resize(1000,1000);
    preview.exec();
    }@

    Now I need to change the displaying document in preview according to the selection of user. So I think to add a QComboBox to the toolbar of QPrintPreviewDialog.

    1) Can anybody tell me is it possible?

    1. If possible I would like to know best way of doing that.

    Thank you all.. waiting for helping hand..

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hareen Laks
      wrote on last edited by
      #2

      If this way not possible can anybody suggest a solution.. :)

      Thank you..

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aliks-os
        wrote on last edited by
        #3

        You may try to use QPrintPreviewWidget and build your own dialog

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved