开发者

Can't dismiss NSAlert in Qt app

I'm trying to display an NSAlert in a Qt application. The alert is shown using runModal, in response to some logic that's triggered by a QTimerEvent, so the stack looks like this:

[NSAlert runModal]
<.......>
timerEvent(QTimerEvent*)
<.......>
QCoreApplication::exec()

However, the alert cannot be dismissed. The buttons respond to clicks or key shortcuts, but it is never dismissed. I'm guessing it's some kind of run loop problem: the NSAlert is blocking somehow?

I can display NSAlert elsewhere in the app without problems. If I substitute a QMessageBox it works as expected. Does anyone have any ide开发者_如何转开发as?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜