forked from qt-creator/qt-creator
QmlDesigner: Fix Drag&Drop from Library on Mac
mousePos - QPoint(2,2) still returns the current widget, while -QPoint(3,3) works.
This commit is contained in:
@@ -106,7 +106,7 @@ void CustomDragAndDropIcon::mouseMoveEvent(QMouseEvent *event)
|
|||||||
else {
|
else {
|
||||||
move(-1000, -1000); //if no top level widget is found we are out of the main window
|
move(-1000, -1000); //if no top level widget is found we are out of the main window
|
||||||
}
|
}
|
||||||
QWidget* target = QApplication::widgetAt(globalPos - QPoint(2,2)); //-(2, 2) because:
|
QWidget* target = QApplication::widgetAt(globalPos - QPoint(3,3)); //-(3, 3) because:
|
||||||
// otherwise we just get this widget
|
// otherwise we just get this widget
|
||||||
if (target != m_oldTarget) {
|
if (target != m_oldTarget) {
|
||||||
if (CustomDragAndDrop::isAccepted())
|
if (CustomDragAndDrop::isAccepted())
|
||||||
|
Reference in New Issue
Block a user