显示这个模态窗口后打印的事件如下,打开的窗口触发WindowBlocked后立即触发了WindowUnblocked,这个窗口不能点击,也没有了任何响应和事件。
FileView event: "15:54:41.380" ---- QEvent::Type(Move)
FileView event: "15:54:41.380" ---- QEvent::Type(Resize)
FileView event: "15:54:41.387" ---- QEvent::Type(Show)
vm eventFilter: QEvent::Type(WindowBlocked)
MyAxwidget event: "15:54:41.419" ---- QEvent::Type(WindowBlocked)
MyAxwidget event: "15:54:41.419" ---- QEvent::Type(WindowBlocked)
vm eventFilter: QEvent::Type(WindowBlocked)
FileView event: "15:54:41.419" ---- QEvent::Type(WindowBlocked)
FileView event: "15:54:41.422" ---- QEvent::Type(WindowUnblocked) ***
FileView event: "15:54:41.423" ---- QEvent::Type(ShowToParent)
FileView event: "15:54:41.427" ---- QEvent::Type(LayoutRequest)
FileView event: "15:54:41.430" ---- QEvent::Type(UpdateLater)
FileView event: "15:54:41.440" ---- QEvent::Type(Paint)
FileView event: "15:54:41.468" ---- QEvent::Type(LayoutRequest)
FileView event: "15:54:43.246" ---- QEvent::Type(WindowDeactivate)
FileView event: "15:54:43.261" ---- QEvent::Type(Paint)
FileView event: "15:54:43.284" ---- QEvent::Type(Paint)
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
uiForm = new Form(this);
uiForm->setWindowModality(Qt::ApplicationModal);
uiForm->hide();
m_pAxMapWidget = new QAxWidget(this);
m_pAxMapWidget->setControl(
QString::fromUtf8("{8856F961-340A-11D0-A96B-00C04FD705A2}"));
m_pAxMapWidget->dynamicCall("Navigate(const QString&)","www.baidu.com");
m_pAxMapWidget->show();
QVBoxLayout *pV = new QVBoxLayout;
pV->addWidget(m_pAxMapWidget);
ui->widget->setLayout(pV);
}
void MainWindow::on_pushButton_clicked()
{
uiForm->show();
}
看看.. ..............................