diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2012-12-28 17:35:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-08 13:54:04 +0100 |
commit | 54fd35b134af8d2a17c9c4ece531ddd2ee7258e2 (patch) | |
tree | 07353890fc345ff69920df14bb3a31a2bfe30b7e /tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp | |
parent | 41acb58f23c78133657d3fb7d126b6df67e8846f (diff) |
Fix warnings about not being able to set Window geometry on Windows.
Fully decorated windows cannot be smaller than 160x30 (Large fonts).
Enlarge Windows or remove Window frame to get rid of decorations.
Task-number: QTBUG-28611
Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp index b2cdb87221..64c549c3c2 100644 --- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp +++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp @@ -55,6 +55,14 @@ #include <qformlayout.h> +static inline void setFrameless(QWidget *w) +{ + Qt::WindowFlags flags = w->windowFlags(); + flags |= Qt::FramelessWindowHint; + flags &= ~(Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); + w->setWindowFlags(flags); +} + class tst_QFormLayout : public QObject { Q_OBJECT @@ -345,6 +353,7 @@ void tst_QFormLayout::spacing() void tst_QFormLayout::contentsRect() { QWidget w; + setFrameless(&w); QFormLayout form; w.setLayout(&form); form.addRow("Label", new QPushButton(&w)); |