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/util | |
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/util')
-rw-r--r-- | tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp index 2fbe2a2c16..cebc2e0cbb 100644 --- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp @@ -49,6 +49,14 @@ #include "../../../../shared/filesystem.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 CsvCompleter : public QCompleter { Q_OBJECT @@ -1282,6 +1290,7 @@ private slots: void tst_QCompleter::task246056_setCompletionPrefix() { task246056_ComboBox *comboBox = new task246056_ComboBox; + setFrameless(comboBox); QVERIFY(comboBox->completer()); comboBox->addItem(""); comboBox->addItem("a1"); |