qrubberband

QRubberBand move on QGraphicsView after resizing

妖精的绣舞 提交于 2020-02-16 06:15:31
问题 I have the same problem from this topic: QRubberBand move when I resize window, after a few try I realized that solution from this topic doesn't apply on QGraphics View. Why my selection move, arout QgraphicsView when I resize window. import sys from PyQt5 import QtCore, QtGui, QtWidgets # from PyQt4 import QtCore, QtWidgets class ResizableRubberBand(QtWidgets.QGraphicsView): def __init__(self, parent=None): super(ResizableRubberBand, self).__init__(parent) self.draggable = False self

QRubberBand move on QGraphicsView after resizing

百般思念 提交于 2020-02-16 06:15:06
问题 I have the same problem from this topic: QRubberBand move when I resize window, after a few try I realized that solution from this topic doesn't apply on QGraphics View. Why my selection move, arout QgraphicsView when I resize window. import sys from PyQt5 import QtCore, QtGui, QtWidgets # from PyQt4 import QtCore, QtWidgets class ResizableRubberBand(QtWidgets.QGraphicsView): def __init__(self, parent=None): super(ResizableRubberBand, self).__init__(parent) self.draggable = False self

QRubberBand move when I resize window

自作多情 提交于 2019-12-11 06:17:21
问题 I want to make a selection, so I create a QRect with QRubberband, everything work fine, when i press the button I cand click o image and make a selection, the problem is the selection is moving when I resize the window, how can I stop this behviour? import sys from PyQt5 import QtCore, QtGui, QtWidgets # from PyQt4 import QtCore, QtWidgets class ResizableRubberBand(QtWidgets.QWidget): def __init__(self, parent=None): super(ResizableRubberBand, self).__init__(parent) self.draggable = False

QRubberBand move on QGraphicsView after resizing

可紊 提交于 2019-12-02 07:02:47
I have the same problem from this topic: QRubberBand move when I resize window , after a few try I realized that solution from this topic doesn't apply on QGraphics View. Why my selection move, arout QgraphicsView when I resize window. import sys from PyQt5 import QtCore, QtGui, QtWidgets # from PyQt4 import QtCore, QtWidgets class ResizableRubberBand(QtWidgets.QGraphicsView): def __init__(self, parent=None): super(ResizableRubberBand, self).__init__(parent) self.draggable = False self.mousePressPos = None self.mouseMovePos = None self._band = QtWidgets.QRubberBand(QtWidgets.QRubberBand