// list of QString representations of contact UIDs // This is already populated for me and I can prove that the // strings in it represent valid contact UIDs. QStringList *selectedContacts = ...; GtkWidget* contactChooser = osso_abook_contact_chooser_new_with_capabilities (NULL, qPrintable(windowTitle), caps, order); osso_abook_contact_chooser_set_minimum_selection(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), lower_limit); osso_abook_contact_chooser_set_maximum_selection(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), upper_limit); if (0 != selectedContacts) { QString contact; foreach (contact, *selectedContacts) { OssoABookContact *c = QOssoABookDialog::lookup(contact); if (0 != c) { g= g_list_prepend(g, c); } else qDebug() << "Did not find " << contact; } osso_abook_contact_chooser_select_contacts(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), g); } //Shows a modal dialog. GList* contacts; // Do not free if (gtk_dialog_run(GTK_DIALOG(contactChooser)) == GTK_RESPONSE_OK){ ... }