C++ (Qt)delete view(); // after deleting a new default view will be createdview()->setModel( model() );