Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
1.1.0
-
None
Description
The setRoleNames function is not used in the constructors of classes QMailAccountListModel and QMailMessageListModel. Hence, the associated roles cannot be easily accessed from QML code. I suggest that the constructors of these classes would register the associated roles with the setRoleNames function so that the role data could be easily accessed from a QML delegate. For example, by adding the following code to the constructor of class QMailAccountListModel
QHash<int,QByteArray> roles;
roles[NameTextRole] = "name";
setRoleNames(roles);
the name of an account can be queried in a QML delegate as follows
Component {
id: accountListDelegate
Text
}