Add QComboBox to QPrintPreviewDialog toolbar
-
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?
- If possible I would like to know best way of doing that.
Thank you all.. waiting for helping hand..
-
If this way not possible can anybody suggest a solution.. :)
Thank you..
-
You may try to use QPrintPreviewWidget and build your own dialog