QT帮助中关于QCloseEvent中有一段描述:
Close events contain a flag that indicates whether the receiver wants the widget to be closed or not. When a widget accepts the close event, it is hidden (and destroyed if it was created with the Qt::WA_DeleteOnClose flag). If it refuses to accept the close event nothing happens. (Under X11 it is possible that the window manager will forcibly close the window; but at the time of writing we are not aware of any window manager that does this.)
说明如果对QCloseEvent 调用ignore(),关闭窗口事件应该忽略。但是我点击关闭按钮,然后对closeEvent事件对该事件调用ignore(),KDE的窗口管理器仍然会提示是否中止程序,如果点中止的话程序将强制退出。本人编译环境为32位CentOS,运行环境为64位CentOS。
当运行环境为CentOS 32位没有问题,不知道有没有遇到过此问题,有没有什么解决办法。