I am porting a MFC application to Qt 5.4 and using a QWinWidget
as a container for a QDialog
derived class. Everything works great except when I type , say, Ctrl+X, Ctrl+V, Ctrl+S etc, then these key combinations are handled by the main MFC document event handlers, by-passing the QT dialog completely. A keyPress() event filter in the QDialog
widget does not see them.
QWinWidget *win = new QWinWidget(::AfxGetApp()->m_pMainWnd);
win->showCentered();
CMyDlg dlg(win);
if (dlg.exec()) {
QMessageBox::information(win, "ModalDialog Result", "OK");
}
else {
QMessageBox::information(win, "ModalDialog Result", "Cancel");
}