Skip to content
Permalink
Browse files

script QML

  • Loading branch information
boaglio committed Sep 8, 2014
1 parent ac0afce commit 807bbee73b5eb8294d4d00eadeee92bc1f905530
Showing with 41 additions and 0 deletions.
  1. +41 −0 seriados.qml
@@ -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.
You can’t perform that action at this time.