Qt4:システム環境変数を得る


Qt4:百の定石


OSやハードに関連した変数の取り方をまとめます。

  • ファイルのセパレータは次の関数で取得できます。
    QChar QDir::separator() 
  • ホームディレクトリーも同様です。
    QString QDir::homePath ()
  • スクリーン情報は次のようにすれば取得できます。
    QDesktopWidget *d = QApplication::desktop();
    int w = d->width();     // returns desktop width
    int h = d->height();    // returns desktop height

最新の20件

2020-12-25 2007-03-14 2006-10-30 2006-11-09 2007-03-14 2006-11-09 2006-11-10 2006-11-09 2008-05-20 2007-11-07 2007-11-01

今日の20件

  • counter: 231
  • today: 1
  • yesterday: 0
  • online: 1