Qt

環境変数を取得する

Qt

QStringList QProcess::systemEnvironment(); を使えば良い。

ウィンドウを常に手前に表示する

Qt

http://developer.qt.nokia.com/forums/viewthread/1389 setWindowFlags(Qt::WindowStaysOnTopHint);

QImageとQPixmapの速度比較

Qt

実験のコード片 void MainWindow::paintEvent(QPaintEvent *){ QPainter painter(this); QTime timer; QImage image(256, 256, QImage::Format_ARGB32); QPixmap pixmap(QPixmap::fromImage(image)); timer.start(); for (int i = 0; i < 10000; ++i){ paint…

OSごとに処理を分ける

Qt

http://hkpr.info/qt/sample/html/s003.php

QtCreatorでboostを使う

Qt

どちらかというとqmakeの備忘録。基本的には .proファイルに INCLUDEPATH += "C:\boost_1_46_1" win32:LIBS += -L"C:\boost_1_46_1\lib" などとすればよい。環境によって変わるのは面倒なので、環境変数BOOSTDIRを定義し、 INCLUDEPATH += "$$(BOOSTDIR)" LI…