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>
This commit is contained in:
parent
4a6a066df2
commit
a65982d659
@ -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]
|
||||
|
@ -846,6 +846,10 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n);
|
||||
integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can
|
||||
be compared with another similarly processed version id.
|
||||
|
||||
Example:
|
||||
|
||||
\snippet code/src_corelib_global_qglobal.cpp qt-version-check
|
||||
|
||||
\sa QT_VERSION
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user