Results 1 to 4 of 4

Thread: is it possible to insert several qglwidgets into a qgraphicsview?

  1. #1
    Join Date
    Aug 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy is it possible to insert several qglwidgets into a qgraphicsview?

    hello guys,

    i'm writing a 3D CAD tool. the mainwindow contains 4 separate
    qGLwidgets that represent the four cameras viewing from different
    angles.

    now i want to draw some transparent buttons on top of the 4 glwidgets,
    then i found out that the button cannot be drawn properly. the reason
    is here: http://qt.nokia.com/developer/faqs/f...-04.5169407557

    and this article gives a way of rendering transparent windows on top
    of opengl: http://doc.trolltech.com/qq/qq26-openglcanvas.html

    but my case is more complex. i need to render transparent windows on
    top of several qglwidgets (not only one). i tried the same technique,
    inserted several qglwidgets into a graphics scene, and i saw a white
    screen, nothing is drawn. however, if i disable the function call
    "makeCurrent();" within the qglwidget class, at least the widgets are
    drawn, but the opengl content inside the qglwidget is still missing.

    so i bet, this is a context switching problem. because the
    graphicsview uses opengl, it has its own context, and this context
    conflicts with other contexts of the qglwidgets.

    but what should i do now? is there any example of using qglwidget
    inside graphicsview?

    thanks.

  2. #2
    Join Date
    Aug 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Angry Re: is it possible to insert several qglwidgets into a qgraphicsview?

    here is a screen shot of what i want to do. i want to render few transparent buttons on top of several qglwidgets.
    Attached Images Attached Images

  3. #3
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: is it possible to insert several qglwidgets into a qgraphicsview?

    You cant embedd QGLWidgets into a QGraphicsScene. But see http://qt.nokia.com/doc/qq/qq26-openglcanvas.html
    It's nice to be important but it's more important to be nice.

  4. #4
    Join Date
    Aug 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Red face Re: is it possible to insert several qglwidgets into a qgraphicsview?

    thank you.

    but like i said, i need to render several opengl windows inside the graphicsview. things are more complex in my case.

Similar Threads

  1. Replies: 0
    Last Post: 29th September 2009, 02:28
  2. Replies: 1
    Last Post: 16th September 2009, 11:23
  3. Replies: 0
    Last Post: 5th March 2009, 06:54
  4. QGraphicsView and embeded widgets
    By bunjee in forum Qt Programming
    Replies: 10
    Last Post: 12th October 2008, 07:43
  5. getting QGraphicsView to resize
    By MrGarbage in forum Qt Programming
    Replies: 1
    Last Post: 22nd January 2008, 03:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.