showing list of posts

This commit is contained in:
Jeena 2015-01-14 23:37:55 +01:00
parent 2efb4a4fb9
commit 13893312d8
2 changed files with 12 additions and 7 deletions

View file

@ -11,13 +11,18 @@ ApplicationWindow {
menuBar: TheMenuBar {}
Row {
ListView {
width: 300
model: server.posts
delegate: Text {
text: title
}
anchors.fill: parent
Component {
id: delegate
Text { text: title }
}
ListView {
anchors.fill: parent
model: server.posts
delegate: delegate
}
Content {
id: content
anchors.fill: parent

2
post.h
View file

@ -13,7 +13,7 @@ class Post : public QObject
Q_PROPERTY(QString feedTitle READ feedTitle)
Q_PROPERTY(QString id READ id)
Q_PROPERTY(QString feedId READ feedId)
Q_PROPERTY(QString author READ author)
Q_PROPERTY(QString author READ author CONSTANT)
Q_PROPERTY(QUrl link READ link)
Q_PROPERTY(QDateTime date READ date)
Q_PROPERTY(QString content READ content)