diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp index 1bbbfd610e..d6b7fc20ed 100644 --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -94,6 +94,8 @@ private slots: #ifndef QT_NO_DRAGANDDROP void tst_dnd(); #endif + + void tst_qtbug35600(); }; void tst_QWidget_window::initTestCase() @@ -568,5 +570,33 @@ void tst_QWidget_window::tst_dnd() } #endif +void tst_QWidget_window::tst_qtbug35600() +{ + QWidget w; + w.show(); + + QWidget *wA = new QWidget; + QHBoxLayout *layoutA = new QHBoxLayout; + + QWidget *wB = new QWidget; + layoutA->addWidget(wB); + + QWidget *wC = new QWidget; + layoutA->addWidget(wC); + + wA->setLayout(layoutA); + + QWidget *wD = new QWidget; + wD->setAttribute(Qt::WA_NativeWindow); + wD->setParent(wB); + + QWidget *wE = new QWidget(wC, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowTransparentForInput); + wE->show(); + + wA->setParent(&w); + + // QTBUG-35600: program may crash here or on exit +} + QTEST_MAIN(tst_QWidget_window) #include "tst_qwidget_window.moc" |