Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Retrieving text messages from inbox

    QML and Qt Quick
    2
    2
    1411
    Loading More Posts
    • 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.
    • V
      viral.parmar last edited by

      tried a lot to display list of all message in my inbox , below is code i have tried with ..
      @import Qt 4.7
      import com.nokia.symbian 1.0
      import QtMobility.messaging 1.1

      Window {
      id: root
      ListView {
      id: list
      anchors.fill: parent
      model: MessageModel {
      sortBy: MessageModel.Timestamp
      sortOrder: MessageModel.DescendingOrder
      }
      delegate: listDelegate
      }
      Component {
      id: listDelegate

                Item {
                    id: listItem
      
                    // The texts to display
                    Column {
                        anchors {
                            left:  listItem.paddingItem.left
                            top: listItem.paddingItem.top
                            bottom: listItem.paddingItem.bottom
                            right: checkbox.left
                        }
      
                        Text { id: subjText; text: subject; font.pixelSize: 13; x: 3 }
                                     Text {
                                         text: sender; color: "gray"; font.pixelSize: 9
                                         x: 3; width: parent.width-100;
                                         anchors.top: subjText.bottom; anchors.topMargin: 3
                                         elide: Text.ElideRight
                                     }
                                     Text {
                                         text: date; color: "gray"; font.pixelSize: 9
                                         anchors.right: parent.right
                                         anchors.top: subjText.bottom; anchors.topMargin: 3
                                     }
                    }
      
          
      
      
      
      
      
                   }
      

      }
      }@
      nothing appears on window screen..

      Regards
      Viral Parmar

      1 Reply Last reply Reply Quote 0
      • N
        njeisecke last edited by

        Could it be that listItem needs a size? Try to use the column's size as the listItems size, remove the anchors.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post