Search
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
Dyson
All Projects
Dyson
Overview
Activity
Issues
News
Wiki
Download (517 Bytes)
Bug #160
» qscript.cpp
Igor Pashev
, 2013-10-27 08:55 AM
#include
<QtCore/QtCore>
#include
<QtScript/QtScript>
int
main
(
int
argc
,
char
*
argv
[])
{
QCoreApplication
a
(
argc
,
argv
);
QScriptEngine
engine
;
QScriptValue
aValue
=
engine
.
evaluate
(
"2+3"
);
qDebug
()
<<
"aValue:"
<<
aValue
.
toString
();
QScriptValue
aFunction
=
engine
.
evaluate
(
"(function(a,b) {return a+b;})"
);
qDebug
()
<<
"aFunction:"
<<
aFunction
.
toString
();
QScriptValue
jsonParser
=
engine
.
evaluate
(
QLatin1String
(
"JSON.parse"
));
qDebug
()
<<
"jsonParser:"
<<
jsonParser
.
toString
();
return
0
;
}
« Previous
1
2
3
Next »
(1-1/3)
Loading...