Skip to content

Commit

Permalink
chore: Enable qml syntax highlighting in README
Browse files Browse the repository at this point in the history
  • Loading branch information
vially authored and iBelieve committed Oct 29, 2015
1 parent fd93afa commit 15317f1
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,31 @@ The material framework comes with a collection of useful non-UI-related extras i

Promise:

import QtQuick 2.3
import Material.Extras 0.1

Item {
function makePromise() {
var myvalue = "";

var promise = new Promises.Promse();
promise.info.myinfo = "cool info";
promise.then(function( data, info ) {
// send data to the next step
return info.myinfo + " " + data;
});

promise.done(function( data, info ) {
// do something with the data of resolve(...)
});

promise.error(function( error, info ) {
// do something with the data of reject(...)
});
}
```qml
import QtQuick 2.3
import Material.Extras 0.1
Item {
function makePromise() {
var myvalue = "";
var promise = new Promises.Promse();
promise.info.myinfo = "cool info";
promise.then(function( data, info ) {
// send data to the next step
return info.myinfo + " " + data;
});
promise.done(function( data, info ) {
// do something with the data of resolve(...)
});
promise.error(function( error, info ) {
// do something with the data of reject(...)
});
}
}
```

### Licensing

Expand Down

0 comments on commit 15317f1

Please sign in to comment.