summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets
diff options
context:
space:
mode:
authorKai Koehne <[email protected]>2019-04-01 15:49:47 +0200
committerKai Koehne <[email protected]>2019-05-07 07:46:21 +0000
commitc57520e491f420dc83d44ce5382c403192ce4836 (patch)
tree7958ba1eba1b01b7c6de66f87bc4b921eb288759 /src/gui/doc/snippets
parent43763e279644cdd2a52d770b9aeda4d485caaa76 (diff)
Document how to use CMake on Qt Core, Qt GUI's central pages
Add documentation on how to use a module from CMake, alongside the existing documentation about qmake. Separate generic info from module-specific examples, to make it possible to use one include file in all modules. While at it, also remove the mentioning of the central include; it is not something we should actively advocate anymore. Instead, the documentation of every class gives the correct include to use. Task-number: QTBUG-73058 Change-Id: I6b3c0e5ea218dd9c06a491c8fb799a7fcf42dd92 Reviewed-by: Leena Miettinen <[email protected]>
Diffstat (limited to 'src/gui/doc/snippets')
-rw-r--r--src/gui/doc/snippets/code/doc_src_qtgui.pro4
-rw-r--r--src/gui/doc/snippets/overview/using-qt-gui.cmake2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/doc/snippets/code/doc_src_qtgui.pro b/src/gui/doc/snippets/code/doc_src_qtgui.pro
index e7055553360..a5eb5b576c4 100644
--- a/src/gui/doc/snippets/code/doc_src_qtgui.pro
+++ b/src/gui/doc/snippets/code/doc_src_qtgui.pro
@@ -1,7 +1,3 @@
-#! [0]
-#include <QtGui>
-#! [0]
-
#! [1]
QT -= gui
#! [1]
diff --git a/src/gui/doc/snippets/overview/using-qt-gui.cmake b/src/gui/doc/snippets/overview/using-qt-gui.cmake
new file mode 100644
index 00000000000..aecfa458a02
--- /dev/null
+++ b/src/gui/doc/snippets/overview/using-qt-gui.cmake
@@ -0,0 +1,2 @@
+find_package(Qt5 COMPONENTS Gui REQUIRED)
+target_link_libraries(mytarget Qt5::Gui)