mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Lazy Initialize QPrinter
it was taking 3 - 4 secs here to open the print dialog, first I tought it was a bug in our side, but it looks like it's a Qt bug, and by lazy initializing it we don't actually solve this, since it will still take 3 - 4 secs for the printer to start, but the dialog will appear much quicker. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
25aa80846b
commit
19dee335e4
2 changed files with 28 additions and 8 deletions
|
@ -18,12 +18,13 @@ class PrintDialog : public QDialog {
|
|||
|
||||
public:
|
||||
explicit PrintDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
|
||||
virtual ~PrintDialog();
|
||||
|
||||
private:
|
||||
PrintOptions *optionsWidget;
|
||||
QProgressBar *progressBar;
|
||||
Printer *printer;
|
||||
QPrinter qprinter;
|
||||
QPrinter *qprinter;
|
||||
struct print_options printOptions;
|
||||
struct template_options templateOptions;
|
||||
|
||||
|
@ -33,6 +34,7 @@ slots:
|
|||
void previewClicked();
|
||||
void printClicked();
|
||||
void onPaintRequested(QPrinter *);
|
||||
void createPrinterObj();
|
||||
};
|
||||
#endif
|
||||
#endif // PRINTDIALOG_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue