11 import os |
11 import os |
12 |
12 |
13 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QUrl, QFile, QFileDevice |
13 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QUrl, QFile, QFileDevice |
14 from PyQt5.QtGui import QIcon, QPixmap, QPainter |
14 from PyQt5.QtGui import QIcon, QPixmap, QPainter |
15 from PyQt5.QtWidgets import ( |
15 from PyQt5.QtWidgets import ( |
16 QWidget, QHBoxLayout, QMenu, QToolButton, QDialog, QApplication |
16 QWidget, QHBoxLayout, QMenu, QToolButton, QDialog |
17 ) |
17 ) |
18 from PyQt5.QtPrintSupport import QPrinter, QPrintDialog, QAbstractPrintDialog |
18 from PyQt5.QtPrintSupport import QPrinter, QPrintDialog, QAbstractPrintDialog |
19 |
19 |
20 from E5Gui.E5TabWidget import E5TabWidget |
20 from E5Gui.E5TabWidget import E5TabWidget |
21 from E5Gui import E5MessageBox |
21 from E5Gui import E5MessageBox |
22 from E5Gui.E5Application import e5App |
22 from E5Gui.E5Application import e5App |
|
23 from E5Gui.E5OverrideCursor import E5OverrideCursor |
23 |
24 |
24 from .WebBrowserView import WebBrowserView |
25 from .WebBrowserView import WebBrowserView |
25 from .WebBrowserPage import WebBrowserPage |
26 from .WebBrowserPage import WebBrowserPage |
26 from .Tools import WebBrowserTools |
27 from .Tools import WebBrowserTools |
27 from . import WebInspector |
28 from . import WebInspector |
805 @param printer reference to the printer object |
806 @param printer reference to the printer object |
806 @type QPrinter |
807 @type QPrinter |
807 @param browser reference to the browser to be printed |
808 @param browser reference to the browser to be printed |
808 @type WebBrowserView |
809 @type WebBrowserView |
809 """ |
810 """ |
810 QApplication.setOverrideCursor(Qt.WaitCursor) |
811 with E5OverrideCursor(): |
811 browser.page().execPrintPage(printer, 10 * 1000) |
812 browser.page().execPrintPage(printer, 10 * 1000) |
812 QApplication.restoreOverrideCursor() |
|
813 |
813 |
814 def __sourceChanged(self, url, browser): |
814 def __sourceChanged(self, url, browser): |
815 """ |
815 """ |
816 Private slot to handle a change of a browsers source. |
816 Private slot to handle a change of a browsers source. |
817 |
817 |