Hi guys,

I have implemented my own QGraphicsScene::drawBackground(QPainter* ....) method.
I draw a map in that method, but before drawing, to get the correct image, I had to make these transformations:
(*****)
Qt Code:
  1. ....
  2. painter->translate(550,300);
  3. painter->rotate(180);
  4. painter->scale(-3.37778,3.37778);
  5.  
  6. painter->drawRect(m_rectangle);
  7. ...
To copy to clipboard, switch view to plain text mode 
and then I got the correct map drawn. In this method I also draw same rectangles.

Now, after I have my map and the rectangles drawn in the drawBackground(QPainter*..) I need to add some QGraphicsTextItems in the center of that rectangles, but I have problems with finding the transformation for the items to draw them in the correct place.
Now I need to add a QGraphicsTextItem in the center of the "m_rectangle";

I tried using the same transform (*****) for my items (like item->translate()...etc), but they I drawn in the wrong place.

How can I get the QGraphicTexItem added in the center of the m_rectangle(which is drawn in the drawBackground(QPainter*) ) ??

I do appreciate any ideas.
Thank you

Maverick