Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Thumbnail contact in QML
Qt 6.11 is out! See what's new in the release blog

Thumbnail contact in QML

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    javiyt
    wrote on last edited by
    #1

    Hi everyone,

    I'm trying to make a simple phonebook with C++ and QML.

    In the QML there is just a ListView with a function to add the contacts from C++. The delegate component has an Image element to show the contact thumbnail.

    I know how to set an Image by its url, for example I can get the url of the picture from the QContactAvatar. What I want to know its how to get the url of the QContactThumbnail, I tried to check the API but I couldn't find it.

    Does anyone know how to get the url of the QContactThumbnail, or another way to add the thumbnail directly to each of the delegates of the ListView?

    Thank you a lot!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      srikanth_trulyit
      wrote on last edited by
      #2

      See "qml avatar":http://doc.qt.nokia.com/qtmobility-1.2/qml-avatar.html element.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        javiyt
        wrote on last edited by
        #3

        Thanks for the answer. I saw it, the problem is that sometimes you have a thumbnail but not an avatar. And the avatar is the tiny version of the avatar, so it's already prepared for a list, less load for the view.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved