Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Segmentation fault on QQuickView::rootObject()

$
0
0
OK, so, I was looking over qmlGui, and realized the only thing that was in it was QQuickView, so I just removed the QmlGui class, and instead this: //Towards the top of my gui.cpp file: QQuickView *view;   //Then later, where I had qmlGui = new QmlGui() view = new QQuickView();   // And later, where I had qmlGui->view.rootObject() (what was segfaulting) QObject *view_obj = view->rootObject(); Now, it compiles fine, it runs without segfaulting now, however it still doesn’t do what’s expected, so I checked view and view_obj to see if they were null: if(view == NULL) printf("view is NULL\n"); if(view_obj == NULL) printf("view_obj is NULL\n"); Now view is not null, but view_obj is, I even tried this: if(view->rootObject() == NULL) printf("NULL\n); and it was NULL, however when I tried this: if(view->engine() == NULL) printf("NULL\n"); and it was NOT null, so view is being successfully pointed too, but for some reason view->rootObject() keeps returning NULL???

Viewing all articles
Browse latest Browse all 4972

Trending Articles