SELECT recid AS contactid, label, email, phone FROM contacts WHERE lower(label) LIKE lower(:searchTerm) ORDER BY label, recid Details.qml = 'Contact.qml'; wrapper.state='opened'; contacts.mode = 'edit'; if (wrapper.state == 'opened' && !contacts.mouseGrabbed) { wrapper.state = ''; contacts.mode = 'list'; } if (wrapper.state == 'opened' && !contacts.mouseGrabbed) { print('confirm and close edit'); Details.qmlItem.update.emit(); wrapper.state = ''; contacts.mode = 'list'; contactList.exec(); }