2016-01-01から1年間の記事一覧

create: CreateWindowEx failed (指定されたモジュールが見つかりません。)

エラーメッセージ create: CreateWindowEx failed (指定されたモジュールが見つかりません。) プログラムが突然終了しました。 原因 QQuickView の親に指定した QWindow オブジェクトの show() を一度も実行していなかったため。 環境 Qt 5.3.2 for Windows

Animation::stopped()

QML

stopped() このシグナルはアニメーションが終了した時に発行されます。 アニメーションは、手動で停止されたか、完了しています。 それは、トップレベル、スタンドアロンなアニメーション向けにのみトリガーされます。それは Behavior や Transition、アニメ…

Bluetooth API における REMEMBERED と AUTHENTICATED の違い

c++ - Bluetooth Programming with Windows Sockets - Device in range - Stack Overflow より Those flags aren't mutually exclusive - a device may be all three or none. これらのフラグは、排他ではありません。 - デバイスは、三つすべて無しであって…

レジストリーのキー名の最大サイズは 255 文字

https://support.microsoft.com/ja-jp/kb/256986 より キー名の最大サイズは、255 文字です。

DWORD 型を LPCTSTR 型へ変換する

#include <tchar.h> ... TCHAR lptstr[33]; _itot(dword, lptstr, 10); LPCTSTR p = (LPCTSTR)lptstr;</tchar.h>

MinGW で .cpl (.dll) をリンクする

-l オプションで指示する。この時、拡張子は除く。 Bthprops.cpl をリンクする場合: gcc ... -lBthprops

ASSERT failure in QList<T>::operator[]: "index out of range", file C:/Qt/Qt5.3.2/5.3/mingw482_32/include/QtCore/qlist.h, line 487

問題 アプリケーションが次のエラーで終了する。 ASSERT failure in QList<T>::operator[]: "index out of range", file C:/Qt/Qt5.3.2/5.3/mingw482_32/include/QtCore/qlist.h, line 487 Invalid parameter passed to C runtime function. Invalid parameter </t>…

ASSERT: "!newInterval._ranges.isEmpty()" in file compiler\qv4ssa.cpp, line 3780

問題 アプリケーションが QML ロード時に下記のエラーで終了する。 ASSERT: "!newInterval._ranges.isEmpty()" in file compiler\qv4ssa.cpp, line 3780 Invalid parameter passed to C runtime function. Invalid parameter passed to C runtime function. …

Qt Creator でファイルをデプロイする方法

プロジェクト (.pro) ファイルに次の行を書く。 {任意の識別名}.path = {デプロイ先フォルダー} {任意の識別名}.files = {デプロイ元ファイル} INSTALLS += {任意の識別名} 例: Debug: DESTSUBDIR = debug Release: DESTSUBDIR = release pictures.path = $…

Windows から git プロトコルで push するとハングアップする

環境 Windows 7 Professional 64-bit Git for Windows 2.8.1 64-bit 解決策 $ git config sendpack.sideband false 原因 仕様らしい。 d.hatena.ne.jp 参考文献 How to fix Windows 7 64 Bit git push msysgit hang up Problem | Daily Development

Windows で Git bash を利用して qmldir を作るコマンド

$ cd path/to/qml $ ls *.qml | sed -e "s/\(.*\).qml$/\1 \1.qml\r/g" > qmldir

QByteArray QString::toLocal8Bit() const

Returns the local 8-bit representation of the string as a QByteArray. The returned byte array is undefined if the string contains characters not supported by the local 8-bit encoding. 文字列をローカルの 8 ビットで表した QByteArray を返しま…

QByteArray QString::toLatin1() const

Returns a Latin-1 representation of the string as a QByteArray. 文字列を Latin-1 で表した QByteArray を返します。 The returned byte array is undefined if the string contains non-Latin1 characters. Those characters may be suppressed or repl…

QByteArray QString::toAscii() const

Returns an 8-bit representation of the string as a QByteArray. 文字列を 8 ビットで表した QByteArray を返します。 If a codec has been set using QTextCodec::setCodecForCStrings(), it is used to convert Unicode to 8-bit char; otherwise this f…

QML アプリケーション実行時に "Invalid grouped property access" が出力される

原因 書式が正しく無かったため。 要素名の後にコロン : を書いてなかった。 メンバーを大括弧 [] でなく、中括弧 {} で囲っていた。 メンバーをカンマ , で区切っていなかった。 guests { Person { name: "Leo Hodges" } Person { name: "Jack Smith" } Per…

プロジェクトファイル (.pro) で Qt バージョンに応じて分岐する

Qt

すぐ忘れるのでメモ equals(QT_MAJOR_VERSION, 4){ QT += declarative } greaterThan(QT_MAJOR_VERSION, 4){ # Qt5 or later QT += qml } 参考にしたページ stackoverflow.com

Cannot assign to non-existent property "onCompleted"

QML

アプリケーション実行中に次のメッセージが出力される。 Cannot assign to non-existent property "onCompleted" 原因 onCompleted: { ... 解決策 Component.onCompleted: { ...

git push すると "fatal: remote error: access denied or repository not exported: ..." が表示される

問題 Git daemon をセットアップ後、そこから git clone したリポジトリーを git push すると次のエラーメッセージが表示される。 fatal: remote error: access denied or repository not exported: /path/to/sample.git 環境 Debian 8.3 原因 Git daemon の…

Debian 8 (jessie) に Git daemon をインストールする

Debian には git-daemon-run というお手軽パッケージがあるので、これをインストールする。 # apt-get update # apt-get install git-gaemon-run デフォルトで /var/lib/git 以下のリポジトリーが公開されるが、git-daemon-export-ok を置いたリポジトリーし…

Debian 8 (jessie) に GitWeb をインストールする

APT で GitWeb をインストールする。依存関係で Git も Apache2 もインストールされる。 # apt-get update # apt-get install gitweb Apache2 の CGI モジュールを有効にする。これをやらないと "404 - Not found" になる。 # a2enmod cgi リポジトリ置き場…

Debian 8 (jessie) でビープ音を無効にする方法

次のコマンドを実行する。 # echo 'blacklist pcspkr' >> /etc/modprobe.d/pcspkr-blacklist.conf 実績 Debian 8.3 参考にしたページ DebianでBeepを完全に殺す | nyacom.net

サブモジュールを削除する

Git

対象 1.9.1 手順 $ git submodule deinit path/to/submodule $ git rm path/to/submodule 参考 git submoduleを今風な感じで削除する - Qiita

あるコミットのファイル一覧を表示する

$ git ls-tree -r e547 main.c

git rev-list

機能 コミット ID の一覧を表示する。 書式 git rev-list [オプション] <コミット ID>... [ -- パス... ] 用例 すべてのコミット ID を表示する。 $ git rev-list HEAD eyuwuk2b4wwye2g2tph8xb39c3prnw3fcg4k38tt ... 94j6rynzbzyz2jbd2wwmhb9aczzkiwi3xy9fi…

TEXTDOMAINDIR

.mo ファイルの場所を指定する。 設定値 "??/LC_MESSAGES/*.mo" を含むディレクトリーのパス 設定例 $ export LANGUAGE=ja $ export TEXTDOMAINDIR=/path/to → "/path/to/ja/LC_MESSAGES/*.mo" が探される。

ソースディレクトリーを追加する

GDB

directory コマンドを使う。複数の場合はコロン(:)で区切る。 (gdb) directory /path1:/path2

GtkAdjustment

GtkAdjustment: GTK+ 3 Reference Manual GtkAdjustment - A representation of an adjustable bounded value GtkAdjustment - 調整可能な有限値の表現。 Description - 説明 The GtkAdjustment object represents a value which has an associated lower an…

gsettings

機能 GNOME 3 の設定を表示する。 GNOME 3 の設定を変更する。 書式 スキーマの一覧を表示する。 $ gsettings list-schemas キーの一覧を表示する。 $ gsettings list-keys <スキーマ> 値を取得する。 $ gsettings get <スキーマ> <キー> 設定できる値の範囲…

GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

問題 gsettings コマンド実行時に次のメッセージが表示される。 GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications. (GLib-GIO-Message: 'メモリー' Gsettings バックエンドを…

Directory Imports

http://doc.qt.io/qt-5/qtqml-syntax-imports.html#directory-imports A directory which contains QML documents may also be imported directly in a QML document. This provides a simple way for QML types to be segmented into reusable groupings: d…