继承QMessageBox的类的提示框,怎么控制标题栏关闭按钮是否可用???? 现在是不可用,我想设置成可用
收起
默认的应该是可用的才对,不可用试试这个:
Qt::WindowFlags wFlags = mBox.windowFlags(); if(Qt::WindowCloseButtonHint == (wFlags & Qt::WindowCloseButtonHint)) { wFlags = wFlags ^ Qt::WindowCloseButtonHint; mBox.setWindowFlags(wFlags); }
报告相同问题?