你肯定也看 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