Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3DWindow inside WindowContainer crash when deleted
QtWS25 Last Chance

Qt3DWindow inside WindowContainer crash when deleted

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt3dqt3dwindowcrashdeletecontainer
4 Posts 3 Posters 2.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Keyos
    wrote on 12 Jul 2016, 09:09 last edited by
    #1

    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;
    }
    
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 12 Jul 2016, 21:23 last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Keyos
        wrote on 13 Jul 2016, 10:37 last edited by
        #3

        Thanks, my doubt was that i missed something but if the code above is correct way of using Qt3D in a dialog than i'll just wait for the next release, can practice with the 3d module anyway.

        J 1 Reply Last reply 8 Aug 2016, 02:14
        0
        • K Keyos
          13 Jul 2016, 10:37

          Thanks, my doubt was that i missed something but if the code above is correct way of using Qt3D in a dialog than i'll just wait for the next release, can practice with the 3d module anyway.

          J Offline
          J Offline
          JohnLee
          wrote on 8 Aug 2016, 02:14 last edited by JohnLee 8 Aug 2016, 02:14
          #4

          @Keyos I meet the same problem,and when i launch my app,the memory usage become 50% even the dialog is not actived,maybe the next release will be better.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved