Handle when no model is set yet and when the model is changed
When there is no model, there is no selectionModel either. Also when setting the model (or the selectionModel directly) we need to reconnect the selectionModel signals.
When there is no model, there is no selectionModel either. Also when setting the model (or the selectionModel directly) we need to reconnect the selectionModel signals.