Hmm, now I realized that when I was reading your post I saw "view" instead of "scene" in part about dynamic allocation. Nevertheless it somehow solved the problem with the exit code. Do you think that it was just a luck? Maybe there is another mistake?
And to answer your question: I just dynamically allocated memory for view object and I set wiget from the main form to be a parent for it.
Bookmarks