summaryrefslogtreecommitdiff
path: root/doc/howtos.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/howtos.qdoc')
-rw-r--r--doc/howtos.qdoc20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index 3a2f02525..b63e2ca96 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -49,6 +49,7 @@
\li \l{How do I limit the number of concurrent jobs for the linker only?}
\li \l{How do I add QML files to a project?}
\li \l{How do I define a reusable Group of files that can be included in other \QBS files?}
+ \li \l{How do I print the value of a property?}
\endlist
\section1 How do I build a Qt-based project?
@@ -565,4 +566,23 @@
QmlUiFiles {}
}
\endcode
+
+ \section1 How do I print the value of a property?
+
+ Use the \l {Console API}{console API}. For example, suppose your project
+ is not built the way you expect it to be, and you suspect that
+ \c qbs.targetOS has the wrong value:
+
+ \code
+ readonly property bool unix: qbs.targetOS.contains("unix")
+ \endcode
+
+ To find out the value of \c qbs.targetOS, use \c {console.info()}:
+
+ \code
+ readonly property bool unix: {
+ console.info("qbs.targetOS: " + qbs.targetOS)
+ return qbs.targetOS.contains("unix")
+ }
+ \endcode
*/