forked from qt-creator/qt-creator
Fix dropping files onto image viewer
Interactive QGraphicsViews eat all drag&drop events. Since we don't want the view to be "interactive" anyhow, just set it to non-interactive. Dragging the image around if it is larger than the view is not implemented via drag&drop events, so it still works. Fixes: QTCREATORBUG-25462 Change-Id: Iee403bab7ba83f897b4d2cca662c4e82ae4aa529 Reviewed-by: Robert Löhning <robert.loehning@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -67,6 +67,7 @@ ImageView::ImageView(ImageViewerFile *file)
|
|||||||
setScene(new QGraphicsScene(this));
|
setScene(new QGraphicsScene(this));
|
||||||
setTransformationAnchor(AnchorUnderMouse);
|
setTransformationAnchor(AnchorUnderMouse);
|
||||||
setDragMode(ScrollHandDrag);
|
setDragMode(ScrollHandDrag);
|
||||||
|
setInteractive(false);
|
||||||
setViewportUpdateMode(FullViewportUpdate);
|
setViewportUpdateMode(FullViewportUpdate);
|
||||||
setFrameShape(QFrame::NoFrame);
|
setFrameShape(QFrame::NoFrame);
|
||||||
setRenderHint(QPainter::SmoothPixmapTransform);
|
setRenderHint(QPainter::SmoothPixmapTransform);
|
||||||
|
|||||||
Reference in New Issue
Block a user