1 QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); 2 QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);