[solved] Qt 5.3 beta + Qt3D (git) + QGLView + QDialog



  • Hi,

    I've been trying to setup QGLView + 3D content into widget base application's dialog without success. I always run into:

    "ASSERT failure in QGLPainter: "begin() has not been called or it failed", file painting\qglpainter.cpp, line 1665"

    I've been experimenting with basketview example that comes with qt3d. It works fine as it is and also works within QMainWindow:

    BasketView *view = new BasketView();
    QWidget *container = QWidget::createWindowContainer(view);
    centralWidget()->layout()->addWidget(container);

    However, my target is to have a QDialog that contains the 3D view. I know I'm experimenting with code that is not finalized and is under heavy construction but I would appreciate any pointers or experiences on this. Is this even supposed to work (at this stage)?

    thanks



  • I think I figured this out.. just in case someone else is struggling with similar issues.

    The dialog itself was not the problem, the problem was that during QGLView initialization the dialog size was (momentarily) 0 before I updated the size.

    Anyway, QGLView is now working inside a dialog and I can proceed with my little project :)


  • Lifetime Qt Champion

    Hi and welcome to devnet !

    Glad you found out and thanks for sharing the solution :)

    Can you also update the thread title prepending [solved] so other forum users may know a solution has been found :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.