How to detecting moveEvent in child widget?
-
When parent is moved, you would like to receive this event in child object ?
-
We can use the following event forward to do that, but there is a problem, the MainWidget should be the Root widget, and sometimes, the childWidget my be dynamic.
So how I do that to add this functional in cihldWidget's constructor or some other place?
@
void MainWidget::moveEvent(QMoveEvent *e)
{
QWidget::moveEvent(e);
QApplication::sendEvent(ui->childWidget, e);
}
@