Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ApplicationWindow {
- id: app
- visible: true
- function readFile(){
- var request = new XMLHttpRequest()
- request.open('GET', 'qrc:/Kommilitonen.txt')
- request.onreadystatechange = function(event){
- if(request.readyState === XMLHttpRequest.DONE){
- console.log("txt geladen");
- console.log(request.responseText);
- view.model = JSON.parse(request.responseText)
- }
- }
- request.send();
- }
- //id: root
- width: 800; height: 800
- ListView {
- id: view
- anchors { fill: parent; margins: 2 }
- model: KommilitonenModel{}
- delegate: KommilitonenDelegate{}
- Component.onCompleted: readFile();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement