summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/code
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2013-02-26 17:13:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-27 12:02:34 +0100
commita65982d659226ace42fe0a0ca0a2f15523e95e4b (patch)
treea73a181f7b81c33c66f568066a32cf41aa67085d /src/corelib/doc/snippets/code
parent4a6a066df2f104763c35eaaaf8dc7b1366d483b2 (diff)
Add snippet for QT_VERSION_CHECK.
Change-Id: I048771f21ce694329a7e9acd4dbfbebfec964b05 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/doc/snippets/code')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
index ddb84bcc74..7d7d71ac50 100644
--- a/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_global_qglobal.cpp
@@ -598,3 +598,13 @@ bool readConfiguration(const QFile &file)
break;
}
//! [qunreachable-switch]
+
+//! [qt-version-check]
+#include <QtGlobal>
+
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QtWidgets>
+#else
+#include <QtGui>
+#endif
+//! [qt-version-check]