Try to get the item under cursor.

This commit is contained in:
Roberto Raggi
2010-01-24 19:31:38 +01:00
parent 24f5a9c0e4
commit 6db71d185b
2 changed files with 105 additions and 35 deletions

View File

@@ -28,14 +28,17 @@
**************************************************************************/
#include "qmljsinterpreter.h"
#include <QtCore/QMetaObject>
#include <QtCore/QMetaProperty>
#include <QtCore/QDebug>
#ifndef NO_DECLARATIVE_BACKEND
# include <QtDeclarative/QmlType>
# include <QtDeclarative/QmlMetaType>
# include <QtDeclarative/private/qmlgraphicsanchors_p.h> // ### remove me
# include <QtCore/QMetaObject>
# include <QtCore/QMetaProperty>
# include <QtDeclarative/private/qmlgraphicsrectangle_p.h> // ### remove me
# include <QtDeclarative/private/qmlvaluetype_p.h> // ### remove me
#endif
using namespace QmlJS::Interpreter;
@@ -1405,6 +1408,10 @@ ObjectValue *Engine::newQmlObject(const QString &name)
QmlObjectValue *object = new QmlObjectValue(&QmlGraphicsAnchors::staticMetaObject, this);
_objects.append(object);
return object;
} else if (name == QLatin1String("QmlGraphicsPen")) {
QmlObjectValue *object = new QmlObjectValue(&QmlGraphicsPen::staticMetaObject, this);
_objects.append(object);
return object;
}
// ### TODO: add support for QML packages