Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-762

Add QML support for QMailAccountListModel and QMailMessageListModel classes

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 1.1.0
    • Messaging: QMF
    • 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

      { text: name }

      }

      Attachments

        Activity

          People

            sanders Don Sanders (closed Nokia identity) (Inactive)
            phn P-H Niemenlehto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: