cannot allocate an object of abstract type 'QDeclarativePrivate::QDeclarativeElement<MyClass>'
エラーメッセージ
error: cannot allocate an object of abstract type 'QDeclarativePrivate::QDeclarativeElement<MyClass>' note: because the following virtual functions are pure within 'QDeclarativePrivate::QDeclarativeElement<MyClass>': note: virtual void MyClass::myFunction()
訳
エラー: 抽象型 'QDeclarativePrivate::QDeclarativeElement<MyClass>' のオブジェクトをアロケートできない 注記: 理由は右記の仮想関数が純粋仮想関数のため。 'QDeclarativePrivate::QDeclarativeElement<MyClass>': 注記: virtual void MyClass::myFunction()
原因
MyClass を qmlRegisterType() で登録していたため。
解決方法
純粋仮想関数をあきらめて、空関数を実装した。