1) keep the IconView and the on_selection_changed signal 2) instead of directly switching to the QR code screen, shedule an "activate" function (with idle_add) of the QR code, when the activate function is ready, shedule the actual switching. 3) add a line that removes the selection when 'new' is clicked.
This is help to mimik the gnome-control-center behaviour.