We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2019-02-17 01:14:54 +0200 |
I want to search for people, weherein the search input string matches with the prefix of the first or last name. I'm using the Nemo QML plugin for contaxts. In the QML type definitions of this plugin I found the following method for the PeopleModel:
Method {
name: "search"
Parameter { name: "pattern"; type: "string" }
}
I assumed, that I can use a regular expression:
import org.nemomobile.contacts 1.0
...
PeopleModel {
id: contacts
...
}
...
var regex = new RegExp("(^|\\s)" + searchInput + "*", i)
contacts.search(regex)
Unfortunately, this doesn't work. Has someone any idea or advice?
2 | No.2 Revision |
I want to search for people, weherein the search input string matches with the prefix of the first or last name. I'm using the Nemo QML plugin for contaxts. In the QML type definitions of this plugin I found the following method for the PeopleModel:
Method {
name: "search"
Parameter { name: "pattern"; type: "string" }
}
I assumed, that I can use a regular expression:
import org.nemomobile.contacts 1.0
...
PeopleModel {
id: contacts
...
}
...
var regex = new RegExp("(^|\\s)" + searchInput + "*", i)
contacts.search(regex)
Unfortunately, this doesn't work. Has someone any idea or advice?
3 | No.3 Revision |
I want to search for people, weherein the search input string matches with the prefix of the first or last name. I'm using the Nemo QML plugin for contaxts. In the QML type definitions of this plugin I found the following method for the PeopleModel:
Method {
name: "search"
Parameter { name: "pattern"; type: "string" }
}
I assumed, that I can use a regular expression:
import org.nemomobile.contacts 1.0
...
PeopleModel {
id: contacts
...
}
...
var regex = new RegExp("(^|\\s)" + searchInput + "*", i)
contacts.search(regex)
Unfortunately, this doesn't work. Has someone any idea or advice?
4 | No.4 Revision |
I want to search for people, weherein the search input string matches with the prefix of the first or last name. I'm using the Nemo QML plugin for contaxts. In the QML type definitions of this plugin I found the following method for the PeopleModel:
Method {
name: "search"
Parameter { name: "pattern"; type: "string" }
}
I assumed, that I can use a regular expression:
import org.nemomobile.contacts 1.0
...
PeopleModel {
id: contacts
...
}
...
var regex = new RegExp("(^|\\s)" + searchInput + "*", i)
contacts.search(regex)
Unfortunately, this doesn't work. Has someone any idea or advice?
By the way: Does someone know the status of QtPIM respectively QtContacts? They are announced as the officially supported platform API.