fix scale center and mouse scroll issue
This commit is contained in:
parent
b1260c0b41
commit
3576235d14
|
@ -15,6 +15,7 @@ GraphicsView::GraphicsView(QWidget *parent)
|
|||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
||||
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||
setStyleSheet("background-color: rgba(0, 0, 0, 220);"
|
||||
"border-radius: 3px;");
|
||||
setAcceptDrops(true);
|
||||
|
@ -180,8 +181,7 @@ void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
|
|||
void GraphicsView::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
event->ignore();
|
||||
|
||||
return QGraphicsView::wheelEvent(event);
|
||||
// blumia: no need for calling parent method.
|
||||
}
|
||||
|
||||
void GraphicsView::resizeEvent(QResizeEvent *event)
|
||||
|
|
Loading…
Reference in New Issue
Block a user