Skip to content

Commit f5b9e06

Browse files
committed
fix WindowWithDeclarativeViewTest for qt5
1 parent 329ce03 commit f5b9e06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Test/WindowWithDeclarativeViewTest.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ WindowWithDeclarativeViewTestWidget::WindowWithDeclarativeViewTestWidget(QWidget
3737
QVBoxLayout *vbl = new QVBoxLayout(this);
3838
vbl->addLayout(hbl);
3939
vbl->addWidget(pLabel);
40+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
41+
QWidget *container = QWidget::createWindowContainer(pView);
42+
vbl->addWidget(container);
43+
#else
4044
vbl->addWidget(pView);
45+
#endif
4146
this->setLayout(vbl);
4247
}
4348

0 commit comments

Comments
 (0)