Fixed exit of the application, use QWidget::close() instead of
destructor.