Retrieving text messages from inbox
-
wrote on 7 Nov 2011, 18:25 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.1Window {
id: root
ListView {
id: list
anchors.fill: parent
model: MessageModel {
sortBy: MessageModel.Timestamp
sortOrder: MessageModel.DescendingOrder
}
delegate: listDelegate
}
Component {
id: listDelegateItem { 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.. -
wrote on 8 Nov 2011, 12:18 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/2