diff options
Diffstat (limited to 'printer.cpp')
-rw-r--r-- | printer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/printer.cpp b/printer.cpp index f8a90f96d..446a5c29d 100644 --- a/printer.cpp +++ b/printer.cpp @@ -13,6 +13,12 @@ Printer::Printer(QPrinter *printer, print_options *printOptions, template_option this->templateOptions = templateOptions; dpi = 0; done = 0; + webView = new QWebView(); +} + +Printer::~Printer() +{ + delete webView; } void Printer::putProfileImage(QRect profilePlaceholder, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile) @@ -118,7 +124,6 @@ void Printer::templateProgessUpdated(int value) void Printer::print() { TemplateLayout t(printOptions, templateOptions); - webView = new QWebView(); connect(&t, SIGNAL(progressUpdated(int)), this, SLOT(templateProgessUpdated(int))); dpi = printer->resolution(); |