I'm trying to use Qt classes directly in QtScript
function Script ()
{
var rect
= new QRectF(0,
0,
10,
5) ;
level.addPolygon(polygon);
}
function entry_point()
{
Script() ;
}
function Script ()
{
var rect = new QRectF(0,0,10,5) ;
var polygon = new QPolygonF(rect) ;
level.addPolygon(polygon);
}
function entry_point()
{
Script() ;
}
To copy to clipboard, switch view to plain text mode
When I evaluate the entry_point() function, this gives me :
ReferenceError: Can't find variable: QRectF
Does anybody can tell me what I'm missing (must be obvious) ?
If I can't use Qt this way, is there a solution ?
Bookmarks