StandardButton QMessageBox::warning ( QWidget * parent, const QString & title, const QString & text,StandardButtons buttons = Ok, StandardButton defaultButton将第一个参数设为NULL,就正确了