Skip to content

Commit

Permalink
script QML
Browse files Browse the repository at this point in the history
  • Loading branch information
boaglio committed Sep 8, 2014
1 parent ac0afce commit 807bbee
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions seriados.qml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,41 @@


import me.qtquick.MongoDB 0.1
import QtQuick 2.0
import QtQuick.Controls 1.0

ApplicationWindow {
visible: true
width: 360
height: 360
title: "Qt com MongoDB!"

id: janela
color: "steelblue"

Database {
id: db
host: '127.0.0.1'
port: 27017
name: 'test'

property Collection seriados: Collection { name: 'seriados' }
}

ListView {

id: lista
anchors.fill: parent

clip: true

model: db.seriados.find({"nome" : "Breaking Bad"})

delegate: Text {
text: JSON.stringify(model.modelData, null, 4)
}
}

}


0 comments on commit 807bbee

Please sign in to comment.