首页 新闻 会员 周边 捐助

qt应用程序加载含有QAxwidget界面插件后显示一个模态窗口时为什么会同时触发Windowblocked和WindowUnblocked事件导致界面没有了响应?

0
悬赏园豆:200 [待解决问题]

显示这个模态窗口后打印的事件如下,打开的窗口触发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();
}

llllxs的主页 llllxs | 初学一级 | 园豆:2
提问于:2024-06-07 16:15
< >
分享
所有回答(1)
0

看看.. ..............................

tea2007 | 园豆:3 (初学一级) | 2024-06-07 17:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册