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 {} menuBar: TheMenuBar {}
Row { Row {
anchors.fill: parent
Component {
id: delegate
Text { text: title }
}
ListView { ListView {
width: 300 anchors.fill: parent
model: server.posts model: server.posts
delegate: Text { delegate: delegate
text: title
}
} }
Content { Content {
id: content id: content
anchors.fill: parent 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 feedTitle READ feedTitle)
Q_PROPERTY(QString id READ id) Q_PROPERTY(QString id READ id)
Q_PROPERTY(QString feedId READ feedId) 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(QUrl link READ link)
Q_PROPERTY(QDateTime date READ date) Q_PROPERTY(QDateTime date READ date)
Q_PROPERTY(QString content READ content) Q_PROPERTY(QString content READ content)