Qt 環境で利用可能なプラグマ ディレクティブについて説明されている記事を誰か教えてもらえますか?
3796 次
2 に答える
6
AFAIKpragmaディレクティブはプリプロセッサおよびコンパイラ ディレクティブであり、Qt 自体とはあまり関係がありません。
- http://gcc.gnu.org/onlinedocs/cpp/Pragmas.html
- http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
- https://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/gcc/pragmas.html
Qt はいくつかの define を提供します。これは、コンパイルしているプラットフォームに応じて、ソース コードの一部を有効化/無効化するために使用できます。
次のように使用できます。
#ifdef Q_WS_MAC
(some mac code goes here)
#endif
#ifdef Q_WS_WIN32
(some windows code goes here)
#endif
于 2010-01-14T11:33:02.473 に答える
0
定義によって削除できる Qt のモジュールの完全なリストは、元の Qt ダウンロードのフォルダーにある src>corelib>global>qconfig-minimal.h にあります。
于 2010-01-15T03:57:35.593 に答える