Qt3DWindow inside WindowContainer crash when deleted
Unsolved
General and Desktop
-
Trying to use Qt3D inside a dialog so embedding the Qt3DWindow in a widget and inserting the widget in a layout of the dialog, but the program crash randomly when closing the dialog, this looks similar to this bug:
https://bugreports.qt.io/browse/QTBUG-53834
if not what i'm doing wrong?DIALOG_TEST::DIALOG_TEST(QWidget *parent): QDialog(parent), ui(new Ui::DIALOG_TEST) { ui->setupUi(this); Qt3DExtras::Qt3DWindow *view=new Qt3DExtras::Qt3DWindow(); if(view) { view->defaultFramegraph()->setClearColor(Qt::black); QWidget *container=QWidget::createWindowContainer(view); if(container) { QSize screen_size(view->screen()->size()); container->setMinimumSize(QSize(200,100)); container->setMaximumSize(screen_size); container->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); ui->layout_area->insertWidget(0,container); } } } DIALOG_TEST::~DIALOG_TEST() { delete ui; }
-
Hi,
Before speculating, it would be better to test your code against the latest version of the Qt3D module that includes the fixe mentioned in the bug report. Meaning building Qt3D from sources.