In qdeclarativeitemsmodule.cpp, QAction is registered as @qmlRegisterType<QAction>();@
This type of registration does not make the class available for instantion in QML as an element. There are (at least) two pieces missing:
QAction doesn't have a default constructor (see requirement "here":http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html#adding-types) registration would need to be done via qmlRegisterType<QAction>("Qt",4,7,"Action");One option might be for you to subclass QAction, provide a default constructor, and then register the type yourself, in a QML plugin. e.g. @qmlRegisterType<QAction>("MyComponents",1,0,"Action");@
and then @import Qt 4.7
import MyComponents 1.0 as Extras
Item {
Extras.Action { ... }
}
@
Regards,
Michael