「Qtの設定 - Qt5プロジェクトへの移行」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「== 概要 == ここでは、Qt5プロジェクトへの移行手順を記載する。<br> <br><br> == プロジェクトファイル == # Qt4 QT += core gui network we…」) |
細 (文字列「__FORCETOC__」を「{{#seo: |title={{PAGENAME}} : Exploring Electronics and SUSE Linux | MochiuWiki |keywords=MochiuWiki,Mochiu,Wiki,Mochiu Wiki,Electric Circuit,Electric,pcb,Mathematics,AVR,TI,STMicro,AVR,ATmega,MSP430,STM,Arduino,Xilinx,FPGA,Verilog,HDL,PinePhone,Pine Phone,Raspberry,Raspberry Pi,C,C++,C#,Qt,Qml,MFC,Shell,Bash,Zsh,Fish,SUSE,SLE,Suse Enterprise,Suse Linux,openSUSE,open SUSE,Leap,Linux,uCLnux,Podman,電気回路,電子回路,基板,プリント基板 |description={{PAGENAME}} - 電子回路とSUSE Linuxに関する情報 | This pag…) |
||
| 59行目: | 59行目: | ||
その他、SendMessageが予約語になったため、注意すること。<br> | その他、SendMessageが予約語になったため、注意すること。<br> | ||
<br><br> | <br><br> | ||
{{#seo: | |||
|title={{PAGENAME}} : Exploring Electronics and SUSE Linux | MochiuWiki | |||
|keywords=MochiuWiki,Mochiu,Wiki,Mochiu Wiki,Electric Circuit,Electric,pcb,Mathematics,AVR,TI,STMicro,AVR,ATmega,MSP430,STM,Arduino,Xilinx,FPGA,Verilog,HDL,PinePhone,Pine Phone,Raspberry,Raspberry Pi,C,C++,C#,Qt,Qml,MFC,Shell,Bash,Zsh,Fish,SUSE,SLE,Suse Enterprise,Suse Linux,openSUSE,open SUSE,Leap,Linux,uCLnux,Podman,電気回路,電子回路,基板,プリント基板 | |||
|description={{PAGENAME}} - 電子回路とSUSE Linuxに関する情報 | This page is {{PAGENAME}} in our wiki about electronic circuits and SUSE Linux | |||
|image=/resources/assets/MochiuLogo_Single_Blue.png | |||
}} | |||
__FORCETOC__ | __FORCETOC__ | ||
[[カテゴリ:Qt]] | [[カテゴリ:Qt]] | ||
2024年10月14日 (月) 11:02時点における最新版
概要
ここでは、Qt5プロジェクトへの移行手順を記載する。
プロジェクトファイル
# Qt4 QT += core gui network webkit # Qt5 QT += core gui network webkitwidgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QApplicationの宣言
# Qt4 #include <QtGui/QApplication> # Qt5 #include <QApplication>
ローカルディレクトリ
# Qt4 QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); # Qt5 QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
QTableWidgetの行の高さを固定する方法が異なる
# Qt4 ui->tblwgt->verticalHeader()->setResizeMode(QHeaderView::Fixed); # Qt5 ui->tblwgt->verticalHeader()->setDefaultSectionSize(100); ui->tblwgt->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
ソフトウェアの配布
Qt5プロジェクトにおいて、Windows向けソフトウェアを配布する場合、実行ファイル(.exeファイル)と同じディレクトリに以下のファイルを同梱する。
platformsフォルダ ├ qminimal.dll └ qwindows.dll
その他の注意点
# Qt4 QHttp # Qt5 QNetworkAccessManager
# Qt4 QString.toAscii() # Qt5 QString.toUtf8()
その他、SendMessageが予約語になったため、注意すること。