diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-09-03 14:02:13 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-10-15 10:55:18 +0000 |
commit | 1f6bfc220774e9407fe88916843b76ed103cff72 (patch) | |
tree | 8d6157d5b974e6045d75a716f8eb0db4daefa35f /src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp | |
parent | 02a214442781bf112c1cc85d2470c6fcec8ed207 (diff) |
Doc: Move literal code block to a separate file
We need to override this snippet for the documentation
we generate for Qt for Python, and it is easier to have
it on a separate file.
Task-number: PYSIDE-801
Task-number: PYSIDE-691
Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp index 4bdaa4d657..a19dc086ac 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qrect.cpp @@ -58,3 +58,13 @@ QRect r2(QPoint(100, 200), QSize(11, 16)); QRectF r1(100.0, 200.1, 11.2, 16.3); QRectF r2(QPointF(100.0, 200.1), QSizeF(11.2, 16.3)); //! [1] + +//! [2] +QRect r = {15, 51, 42, 24}; +r = r.transposed(); // r == {15, 51, 24, 42} +//! [2] + +//! [3] +QRectF r = {1.5, 5.1, 4.2, 2.4}; +r = r.transposed(); // r == {1.5, 5.1, 2.4, 4.2} +//! [3] |