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

Add QML support for QMailAccountListModel and QMailMessageListModel classes

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: Messaging: QMF
    • Labels:
      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes