Try This: setAttribute(Qt::WA_WState_ExplicitShowHide);