Qtのソースコード中に登場するQ_QとQ_Dについての解説
Qt-HowTo: Private Classes and D-Pointers « Zchydem’s Blog
http://zchydem.enume.net/2010/01/19/qt-howto-private-classes-and-d-pointers/
Qtのソースコード中に登場するQ_QとQ_Dについての解説
Qt-HowTo: Private Classes and D-Pointers « Zchydem’s Blog
http://zchydem.enume.net/2010/01/19/qt-howto-private-classes-and-d-pointers/
Qtの使い方メモ
.pro
に下記を追加
CONFIG += c++11
QMAKE_CXXFLAGS += -std=c++11
なども使えます。
QCoreApplication::applicationFilePath()
ファイル名だけが欲しい場合はQFileInfo
を使って
QFileInfo(QCoreApplication::applicationFilePath()).fileName()
とできます。
QCoreApplication::applicationDirPath()
アプリケーション名
QCoreApplication::applicationName()
バージョン番号
QCoreApplication::applicationVersion()
windeployqt.exe
というツールで必要なファイル一式をコピーできます。
windeployqt.exe app.exe
※app.exe
のところは作ったQt製アプリへのパスにします。
windeployqt.exe
はQtのインストールで下記の場所にコピーされます。
C:\Qt\<バージョン>\<コンパイラ>\bin
Pythonではcalendar
というモジュールを使うと簡単にカレンダーを表示できます。
>>> import calendar
>>> text = calendar.TextCalendar()
>>> text.formatmonth(2015,1)
January 2015
Mo Tu We Th Fr Sa Su
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
日曜日を週の先頭に移動する場合はsetfirstweekday
を使います。
>>> text.setfirstweekday(calendar.SUNDAY)
>>> text.formatmonth(2015,1)
January 2015
Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
年間のカレンダー表示はformatyear
です。
>>> text.formatyear(2015)
テキストの代わりにHTMLで出力したい場合はHTMLCalendar
が使えます。
>>> html = calendar.HTMLCalendar()
>>> html.formatmonth(2015,1)
8.2. calendar — General calendar-related functions — Python 3.4.3 documentation
https://docs.python.org/3/library/calendar.html