replace with dialogWidget->hide();