AnsweredAssumed Answered

MapView into QGraphicsWidget

Question asked by jmullen_pasco on Nov 17, 2017
Latest reply on Nov 28, 2017 by jmullen_pasco

The documentation says that MapView can be derived off of to create a QGraphicsWidget; however, it doesn't explain what is required to accomplish this.  Besides implementing the two pure virtual functions, how might one go about implementing this?

 

So this is what I have done so far.  

I created a class that derives off of QGraphicsWidget and MapView. 

In the Paint function I call MapView::Draw.  

In the resize event I resize the MapView.

I have implemented the two pure virtual functions qObjectPointer() and drawRequestedEvent.  I'm not really sure what happens in drawRequestedEvent, so it's just stubbed out.

 

However, when the Graphics Widget is drawn all you see is a grey background.

Outcomes