Resizing support in QWidgetWindow.
This commit is contained in:
parent
af77656f15
commit
5daea69f74
@ -63,6 +63,14 @@ bool QWidgetWindow::event(QEvent *event)
|
||||
handleKeyEvent(static_cast<QKeyEvent *>(event));
|
||||
return true;
|
||||
|
||||
case QEvent::Move:
|
||||
handleMoveEvent(static_cast<QMoveEvent *>(event));
|
||||
return true;
|
||||
|
||||
case QEvent::Resize:
|
||||
handleResizeEvent(static_cast<QResizeEvent *>(event));
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -96,4 +104,16 @@ void QWidgetWindow::handleKeyEvent(QKeyEvent *event)
|
||||
QGuiApplication::sendSpontaneousEvent(widget, event);
|
||||
}
|
||||
|
||||
void QWidgetWindow::handleMoveEvent(QMoveEvent *event)
|
||||
{
|
||||
m_widget->data->crect = geometry();
|
||||
QGuiApplication::sendSpontaneousEvent(m_widget, event);
|
||||
}
|
||||
|
||||
void QWidgetWindow::handleResizeEvent(QResizeEvent *event)
|
||||
{
|
||||
m_widget->data->crect = geometry();
|
||||
QGuiApplication::sendSpontaneousEvent(m_widget, event);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -65,6 +65,8 @@ protected:
|
||||
|
||||
void handleMouseEvent(QMouseEvent *);
|
||||
void handleKeyEvent(QKeyEvent *);
|
||||
void handleMoveEvent(QMoveEvent *);
|
||||
void handleResizeEvent(QResizeEvent *);
|
||||
|
||||
private:
|
||||
QWidget *m_widget;
|
||||
|
Loading…
Reference in New Issue
Block a user