Take Header splitter cursor for QGraphicsProxyWidget

Strangely when a QTreeview is put in GraphicsView using
QGraphicsProxyWidget, QTreeView header splitter cursor does not appears
though section can be resized without that. This change forces
the QGraphicsProxyWidget to take header splitter cursor from lastwidget.

Fixes: QTBUG-128912
Change-Id: I783e8357ae8386af70d28a1495e3b2367921df76
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 769392c3a8055af996f593dccd85ca3f775b1640)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Sami Varanka 2024-10-30 09:29:14 +02:00 committed by Qt Cherry-pick Bot
parent f0c51f8f83
commit ff48e158ab

View File

@ -295,6 +295,15 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent
#endif #endif
} }
#ifndef QT_NO_CURSOR
// Keep cursor in sync
if (lastWidgetUnderMouse) {
QCursor widgetsCursor = lastWidgetUnderMouse->cursor();
if (q->cursor() != widgetsCursor)
q->setCursor(widgetsCursor);
}
#endif
event->setAccepted(mouseEvent.isAccepted()); event->setAccepted(mouseEvent.isAccepted());
} }