• 6016阅读
  • 5回复

弹出消息框的问题 [复制链接]

上一主题 下一主题
离线xiongyu
 

只看楼主 正序阅读 楼主  发表于: 2009-08-13
— 本帖被 XChinux 执行加亮操作(2009-08-15) —
         做一个程序,想要他弹出一个消息框

但弹出消息框后,主窗口就不动了,必须要关了消息框才可以再动

怎么可以搞到消息框和主窗口分开?
为自己而已努力吧... 我的博客 http://xycode.org
离线xiongyu

只看该作者 5楼 发表于: 2009-08-15
引用第3楼dbzhang800于2009-08-14 08:13发表的  :
你肯定也看 QMessageBox Class Reference 了吧
The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.
A message box displays a primary text to alert the user to a situation, an informative text to further explain the alert or to ask the user a question, and an optional detailed text to provide even more data if the user requests it. A message box can also display an icon and standard buttons for accepting a user response.
.......



终于明白了。。谢谢你。。
为自己而已努力吧... 我的博客 http://xycode.org
离线mecland
只看该作者 4楼 发表于: 2009-08-14
对, 是模式与非模式的问题
离线dbzhang800

只看该作者 3楼 发表于: 2009-08-14
你肯定也看 QMessageBox Class Reference 了吧

The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.

A message box displays a primary text to alert the user to a situation, an informative text to further explain the alert or to ask the user a question, and an optional detailed text to provide even more data if the user requests it. A message box can also display an icon and standard buttons for accepting a user response.

QMessageBox 提供的是模态的对话框,你既然需要非模态的,应该考虑 QMessageBox 的父类 QDialog
离线xiongyu

只看该作者 2楼 发表于: 2009-08-14
看了一下,但还是不明白呃。
弹出个QMessageBox,程序就停在那了。

我想他继续执行,而QMessageBox又还在

能不能说得更详细点?
为自己而已努力吧... 我的博客 http://xycode.org
离线dbzhang800

只看该作者 1楼 发表于: 2009-08-13
你想说的就是对话框的两种模态
modal
modeless
具体看QDialog Class Reference
快速回复
限100 字节
 
上一个 下一个