QGraphicsView is embedded into the QGraphicsView,QGraphicsItem incomplete
-
-
Hi
By incomplete - you mean not all of the inner QGraphicsView is visible ?
Or that the QGraphicsView is smaller than it should be ?
Im wondering if you need to use
http://doc.qt.io/qt-5/qgraphicsview.html#fitInView -
Hi
Super with pictures.
So its not drawn at all it seems.
and you are sure its located as shown on second image ?
I mean, it has that size etc?the purple rect is a normal QGraphicsRectItem ?
Im not 100% sure that QGraphicsProxyWidget can handle a QGraphicsView due the event
and coordinates propagation/handling.
On the other hand, it is a Widget so no apparent reason why not.ps. btw, welcome to the forums :)
-
@mrjj
Hi
Thanks for your helpI am sure its were created and size are correct.
yes, the purple rect is a normal QGraphicsRectItem.I find QGraphicsProxyWidget pos is (0,0) ,
All item and widget under QGraphicsView can be displayed.
But I still don't know why.
maybe the transform of QGraphicsProxyWidget causes the render area of the item to be incorrect.ps. I am very happy to join the forums.
-
@wangcj
I also suspect the coordinates mapping might be incorrect for the nested QGraphicsView .
In theory it should work but seems not from your actual code.
The docs
http://doc.qt.io/qt-5/graphicsview.html
says
" You can even embed a new QGraphicsView into your scene to provide complex nested scenes."so it sounds like it should work. :)
What Qt version are you using ?