showing list of posts
This commit is contained in:
parent
2efb4a4fb9
commit
13893312d8
2 changed files with 12 additions and 7 deletions
17
main.qml
17
main.qml
|
@ -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
2
post.h
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue