[Interest] Qt3DExtras::Qt3DWindow

Igor Mironchik igor.mironchik at gmail.com
Fri Apr 7 18:44:08 CEST 2017


When embedding Qt3DExtras::Qt3DWindow to QWidget based application, i.e. 
use QWidget * container = QWidget::createWindowContainer( view, q ); in 
the widget, you have to allocate Qt3DExtras::Qt3DWindow on the heap. Or 
application will crash on exit.

So in main() we need something similar to:

int main( int argc, char ** argv )
     QApplication app( argc, argv );

     Qt3DExtras::Qt3DWindow * view = new Qt3DExtras::Qt3DWindow;

     MainWindow w( view );


     return app.exec();

view allocated but never deleted and I didn't find any possibility to 
clear resources on exit.

What do you guys suggest in this situation? Keep as is or think about it?

More information about the Interest mailing list