Create a new QObject from QML scripts

I would like to do something like this from my QML script:
@onPressed: {
var item = new myQObject;
}@
I did the following in C++:
@qmlRegisterType<MyQObject>("Module", 1,0, "myQObject");@
Have I missed something ?