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

QML ContactModel doesn't pick up thumbnails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.1.x
    • 1.1.0
    • Contacts
    • None
    • Qt Simulator: Using Qt SDK TP 1.1 all on Linux
      Also Qt 4.7 + Mobility 1.1 for Linux desktop
    • 23adfac408c1359d0e90b33124a7394d6d4dacc2

    Description

      So lets say I have the following code:

      import QtQuick 1.0
      import QtMobility.contacts 1.1
      
      Rectangle {
          gradient: Gradient {
              GradientStop {
                  position: 0
                  color: "black"
              } GradientStop {
                  position: 1
                  color: "grey"
              }
          }
      
          ContactModel {
              id: conModel
              manager: "memory"
              Component.onCompleted:{
                  conModel.importContacts("/home/tshah/all.vcf");
      
              }
          }
      
          Component  {
              id: contactDel
      
              Column {
                  id: theCol
      
                  Image {
                      id: img
                      source: model.contact.thumbnail
                      anchors.horizontalCenter: theCol.horizontalCenter
                      Component.onCompleted: {
                          console.debug(model.contact.thumbnail);
                      }
                  }
                  Text {
                      id: theText
                      text: model.contact.displayLabel
                      color: "white"
                      anchors.horizontalCenter: theCol.horizontalCenter
                  }
              }
          }
      
          GridView {
              id: mainView
              anchors.fill: parent
              model: conModel
              delegate:contactDel
              cellWidth: 200
              cellHeight: 120
          }
      }
      

      This code will import /home/tshah/all.vcf and show all the contacts with their name and thumbnail. Names show up fine; however, the thumnail only shows up as the generic placeholder, it never shows the contact's actual image (see attached snapshot). I confirmed that if I used regular C++, QVersitReader can pick up the proper thumbnail.

      Attachments

        1. indCont.vcf
          25 kB
        2. snapshot1.png
          snapshot1.png
          111 kB

        Activity

          People

            charles Charles Yin (closed Nokia identity) (Inactive)
            tshah Tej Shah
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: