一般来说,在执行QApplication.exec()之前,所有的交互都会被忽略,但是消息框QMessageBox是一个例外,因为它拥有自己的消息循环!
Generally speaking, no user interaction can take place before calling exec(). As a special case, modal widgets like MessageBox
can be used before calling exec(), because modal widgets use their own local event loop.