PDA

View Full Version : Add QGLWidget to view



ashishsaryar
18th January 2008, 12:47
hi to all,


I have a proble there is any way to change QWidget to QGraphicsItem .

Basically i made a Pyramid with the held of opengl's QGLWidget.
Now i want to add this widget to my QGraphicsScene ...
but how will i do i don't know .
so pls help me to overcome this problem.
Thanks
Ashish Kumar Saryar:confused:

Bitto
18th January 2008, 17:29
It's not really possible to make this work (at least not well) until in the upcoming Qt 4.4. If you download a snapshot from ftp.trolltech.com/qt/snapshots you can try two new classes, QGraphicsWidget (http://doc.trolltech.com/main-snapshot/qgraphicswidget.html) and QGraphicsProxyWidget (http://doc.trolltech.com/main-snapshot/qgraphicsproxywidget.html), which are provided to make life easier for you.

ashishsaryar
24th January 2008, 08:07
actually i have to draw a pyramid with 3d .. and i have to show on qgraphcsscene or qgraphics ..

if u haveany idea pls share with me

ashishsaryar
24th January 2008, 09:58
hi to all

i have made a pyramid with the help of opengl.. means with the help of QGLWidget ..

i have also a frame of QMainwindow .
i have setCentralWidget of this frame a graphicsview .
i have also some qgraphicsitem which i m adding to grapphicsview with the help of graphicsscene...

in this i wnt to add this pyramid also but how will i do i don't .
so pls help me to overcome this problem. pls
thanks in advance

:confused:

ashishsaryar
25th January 2008, 10:17
Hi to all,


I have created a pyramid by using QGLWidget. I have also a widget in which central widget is Qgraphicsview and i am and its scene many qgraphicsitem . i want to add this pyramid which is made by the help of qgjwidget but how i dont know . if uhave any idea then pls share with me...

Thanks in advance....

:confused:

aamer4yu
25th January 2008, 10:58
QGLWidget is inherited from QWidget, so you can use the QWidget::show() function to display the widget.

Also if u have a graphicsview, u can alter its rendering using setViewPort() function. Refer to the 40000 chips demo program in the Qt Demos

jpn
25th January 2008, 11:06
{ Threads merged }

Do not start new threads on the same subject, please.