qt: Add a dialog for choosing from existing references