I'm trying to use Qt classes directly in QtScript

Qt Code:
  1. function Script ()
  2. {
  3. var rect = new QRectF(0,0,10,5) ;
  4. var polygon = new QPolygonF(rect) ;
  5. level.addPolygon(polygon);
  6. }
  7.  
  8. function entry_point()
  9. {
  10. Script() ;
  11. }
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 ?