def backingStore(self, widget, size): """ :param QWidget widget: Widget, for which the backinstore is intended :param QSize size: Size of the pixmap :return: A pixmap that can be used as backing store """ if QT_VERSION >= 0x050000: pixelRatio = 1. if widget and widget.windowHandle(): pixelRatio = widget.windowHandle().devicePixelRatio() else: from qwt.qt.QtGui import qApp if qApp is not None: try: pixelRatio = qApp.devicePixelRatio() except RuntimeError: pass pm = QPixmap(size*pixelRatio) pm.setDevicePixelRatio(pixelRatio) else: pm = QPixmap(size) if QT_VERSION < 0x050000 and widget and isX11GraphicsSystem(): if pm.x11Info().screen() != widget.x11Info().screen(): pm.x11SetScreen(widget.x11Info().screen()) return pm
def backingStore(self, widget, size): """ :param QWidget widget: Widget, for which the backinstore is intended :param QSize size: Size of the pixmap :return: A pixmap that can be used as backing store """ if QT_VERSION >= 0x050000: pixelRatio = 1. if widget and widget.windowHandle(): pixelRatio = widget.windowHandle().devicePixelRatio() else: from qwt.qt.QtGui import qApp if qApp is not None: try: pixelRatio = qApp.devicePixelRatio() except RuntimeError: pass pm = QPixmap(size * pixelRatio) pm.setDevicePixelRatio(pixelRatio) else: pm = QPixmap(size) if QT_VERSION < 0x050000 and widget and isX11GraphicsSystem(): if pm.x11Info().screen() != widget.x11Info().screen(): pm.x11SetScreen(widget.x11Info().screen()) return pm
def backingStore(self, widget, size): if QT_VERSION >= 0x050000: pixelRatio = 1. if widget and widget.windowHandle(): pixelRatio = widget.windowHandle().devicePixelRatio() else: from qwt.qt.QtGui import qApp if qApp is not None: try: pixelRatio = qApp.devicePixelRatio() except RuntimeError: pass pm = QPixmap(size*pixelRatio) pm.setDevicePixelRatio(pixelRatio) else: pm = QPixmap(size) if QT_VERSION < 0x050000 and widget and isX11GraphicsSystem(): if pm.x11Info().screen() != widget.x11Info().screen(): pm.x11SetScreen(widget.x11Info().screen()) return pm
def backingStore(self, widget, size): if QT_VERSION >= 0x050000: pixelRatio = 1. if widget and widget.windowHandle(): pixelRatio = widget.windowHandle().devicePixelRatio() else: from qwt.qt.QtGui import qApp if qApp is not None: try: pixelRatio = qApp.devicePixelRatio() except RuntimeError: pass pm = QPixmap(size * pixelRatio) pm.setDevicePixelRatio(pixelRatio) else: pm = QPixmap(size) if QT_VERSION < 0x050000 and widget and isX11GraphicsSystem(): if pm.x11Info().screen() != widget.x11Info().screen(): pm.x11SetScreen(widget.x11Info().screen()) return pm