Fixed wrong mouse coordinate mapping.
QApplication::pickMouseReceiver() does the appropriate mapping if the receiver changes. Change-Id: Ieead2dea55e6119fae695af7fa12ab5cb2ef6dac Reviewed-on: http://codereview.qt-project.org/5148 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
3803111692
commit
7ecbfe6d01
@ -236,11 +236,8 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event)
|
||||
QWidget *widget = m_widget->childAt(event->pos());
|
||||
QPoint mapped = event->pos();
|
||||
|
||||
if (widget) {
|
||||
mapped = widget->mapFrom(m_widget, event->pos());
|
||||
} else {
|
||||
if (!widget)
|
||||
widget = m_widget;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseButtonPress && !qt_button_down)
|
||||
qt_button_down = widget;
|
||||
|
Loading…
Reference in New Issue
Block a user