Created
June 30, 2013 20:47
-
-
Save ultramcu/5896804 to your computer and use it in GitHub Desktop.
Using QML and Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using QML and Javascript | |
Author : MaIII Themd | |
Website : http://miiniq.blogspot.com | |
FB : http://www.facebook.com/PiShared | |
Env : Qt 5.0.2 clang 64 bit OSX 10.8.4 | |
*/ | |
import QtQuick 2.0 | |
Rectangle { | |
width: 500 | |
height:200 | |
color: "black" | |
function js_test(loop) | |
{ | |
var var_str = "http://miiniq.blogspot.com "; | |
for(var i = 0; i < loop; i++) | |
var_str = var_str + "!"; | |
return var_str; | |
} | |
Text { | |
text: parent.js_test(10); | |
anchors.centerIn: parent | |
color: "pink" | |
font.pixelSize: 20; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment