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() で登録していたため。
解決方法
純粋仮想関数をあきらめて、空関数を実装した。
パッケージに含まれるファイルの一覧を表示する方法
$ sudo apt-file update $ apt-file list <パッケージ名>
ゲスト OS で ping を実行すると "(DUP!)" が表示される
問題
ゲスト OS から LAN 上の他の機器へ ping を実行すると “(DUP!)” が表示される。
$ ping 192.168.0.1 PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data. From 192.168.0.2: icmp_seq=1 Redirect Network(New nexthop: 192.168.0.2) 64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=1.02 ms 64 bytes from 192.168.0.2: icmp_seq=1 ttl=254 time=1.08 ms (DUP!) 64 bytes from 192.168.0.2: icmp_seq=1 ttl=255 time=1.09 ms (DUP!) 64 bytes from 192.168.0.2: icmp_seq=1 ttl=254 time=1.09 ms (DUP!)
環境
解決方法
暫定解決
一度、"Routing and Remote Access" サービスを開始して停止する。
恒久解決
次のレジストリキーを削除して Windows を再起動する。
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\RemoteAccess\RouterManagers\Ipv6
参考文献
TypeError: Result of expression 'name.invokeMethod' [undefined] is not a function.
事象
Q_INVOKABLE メソッドが実行されず、次のエラーが表示される。
エラーメッセージ
TypeError: Result of expression 'name.invokeMethod' [undefined] is not a function.
環境
- Qt 4.8.6
- Ubuntu 14.04
原因
A. クラスの定義に Q_OBJECT キーワードが含まれていない。
B. 関数の宣言文に Q_INVOKABLE キーワードが含まれていない。
C. 関数の宣言文を #ifdef Q_OS_LINUX ~ #endif で囲んでいる。
Q_OS_UNIX は defined になるが、Q_OS_LINUX は undefined になる。バグと思われる。
デバッグ開始が失敗する
シャットダウンスクリプト
設定画面
コントロールパネル→システムとセキュリティ→管理ツール→ローカルセキュリティポリシー
スクリプトの保存先(標準)
C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown