diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-01-21 17:12:46 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2016-01-26 13:33:09 +0000 |
commit | ae5c4500c5d717a79214c22a4f11e65381f4ccc8 (patch) | |
tree | 95418f9ea80187e30e898dcac081321173b7bdc4 /tests/manual/diaglib/qwindowdump.cpp | |
parent | 8a3adfbed20b95bfc7d8dd8d31c224c79788def8 (diff) |
Diaglib: Improve output of widgets.
- Make it possible to pass an optional root widget to dumpAllWidgets().
- Add option to output size constraints of widgets/windows.
- Output normal geometry of top levels.
Change-Id: Ib48809d070c5721fe4688a2ad39cb99f286618de
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests/manual/diaglib/qwindowdump.cpp')
-rw-r--r-- | tests/manual/diaglib/qwindowdump.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp index c0faefb918..04576dbcf4 100644 --- a/tests/manual/diaglib/qwindowdump.cpp +++ b/tests/manual/diaglib/qwindowdump.cpp @@ -38,6 +38,7 @@ # include <QtGui/QScreen> # include <QtGui/QWindow> # include <qpa/qplatformwindow.h> +# include <private/qwindow_p.h> # if QT_VERSION >= 0x050600 # include <private/qhighdpiscaling_p.h> # endif @@ -151,6 +152,15 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option str << ' '; formatWindowFlags(str, w->flags()); } + if (options & PrintSizeConstraints) { + str << ' '; + const QSize minimumSize = w->minimumSize(); + if (minimumSize.width() > 0 || minimumSize.height() > 0) + str << "minimumSize=" << minimumSize.width() << 'x' << minimumSize.height() << ' '; + const QSize maximumSize = w->maximumSize(); + if (maximumSize.width() < QWINDOWSIZE_MAX || maximumSize.height() < QWINDOWSIZE_MAX) + str << "maximumSize=" << maximumSize.width() << 'x' << maximumSize.height() << ' '; + } str << '\n'; } |