Thanks man,
just for checking it out i did the following
frame.h file
Qt Code:
  1. #ifndef FRAME_H
  2. #define FRAME_H
  3.  
  4. #include <QGraphicsItem>
  5. #include <QtGui>
  6. #include "umbrella.h"
  7.  
  8. class umbrella;
  9. class QParallelAnimationGroup;
  10.  
  11. class frame : public umbrella
  12. {
  13. public:
  14. frame(QGraphicsItem *parent = 0);
  15. QRectF boundingRect() const;
  16. QPainterPath shape() const; [B] /**<-- did add this line here*/[/B]
  17. void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
  18. void setFramePosMiddle(qreal x,qreal y);
  19. void setFrameRotation(qreal frameRotation);
  20. protected:
  21. void mousePressEvent(QGraphicsSceneMouseEvent *event);
  22. qreal x,y,frameRotation;
  23. };
  24.  
  25. #endif // FRAME_H
To copy to clipboard, switch view to plain text mode 
frame.cpp file
Qt Code:
  1. #include "frame.h"
  2.  
  3. frame::frame(QGraphicsItem *parent)
  4. : umbrella(parent)
  5. {
  6. this->frameRotation=0;
  7. }
  8.  
  9. QRectF frame::boundingRect() const
  10. {
  11. return QRectF(0,0,128,128);
  12. }
  13.  
  14. QPainterPath frame::shape() const
  15. {
  16. QPolygon framePolygon;
  17. framePolygon.append(QPoint(2,27));
  18. framePolygon.append(QPoint(30,1));
  19. framePolygon.append(QPoint(65,8));
  20. framePolygon.append(QPoint(100,1));
  21. framePolygon.append(QPoint(127,28));
  22. framePolygon.append(QPoint(119,64));
  23. framePolygon.append(QPoint(122,96));
  24. framePolygon.append(QPoint(99,126));
  25. framePolygon.append(QPoint(64,119));
  26. framePolygon.append(QPoint(29,125));
  27. framePolygon.append(QPoint(5,96));
  28. framePolygon.append(QPoint(9,62));
  29. path.addPolygon(framePolygon);
  30. return path;
  31. }
  32.  
  33. void frame::paint(QPainter *painter,
  34. const QStyleOptionGraphicsItem *option, QWidget *widget)
  35. {
  36. Q_UNUSED(option);
  37. Q_UNUSED(widget);
  38. QPolygon myframePolygon;
  39. QColor myframecolor;
  40. QBrush myframeBrush;
  41. QPainterPath myframePainterPath;
  42. QPen myframePen;
  43. painter->drawRect(boundingRect());
  44. myframePen.setWidth(4);
  45. myframePen.setColor(Qt::black);
  46. myframePen.setJoinStyle(Qt::RoundJoin);
  47. myframecolor=(QColor(0,0,255,70));
  48. myframeBrush.setColor(myframecolor);
  49. myframeBrush.setStyle(Qt::SolidPattern);
  50. myframePolygon.append(QPoint(2,27));
  51. myframePolygon.append(QPoint(30,1));
  52. myframePolygon.append(QPoint(65,8));
  53. myframePolygon.append(QPoint(100,1));
  54. myframePolygon.append(QPoint(127,28));
  55. myframePolygon.append(QPoint(119,64));
  56. myframePolygon.append(QPoint(122,96));
  57. myframePolygon.append(QPoint(99,126));
  58. myframePolygon.append(QPoint(64,119));
  59. myframePolygon.append(QPoint(29,125));
  60. myframePolygon.append(QPoint(5,96));
  61. myframePolygon.append(QPoint(9,62));
  62. myframePainterPath.addPolygon(myframePolygon);
  63. int frameWide =128;
  64. int frameHigh =128;
  65. int xc = 0 + frameWide/2;
  66. int yc = 0 + frameHigh/2;
  67. painter->translate(+xc,+yc);
  68. painter->rotate(frameRotation);
  69. painter->translate(-xc,-yc);
  70. painter->setPen(myframePen);
  71. painter->drawPolygon(myframePolygon);
  72. painter->fillPath(myframePainterPath,myframeBrush);
  73. }
  74.  
  75. void frame::mousePressEvent(QGraphicsSceneMouseEvent *event){
  76. if(event->button() == Qt::RightButton){
  77. qDebug() << "click with the right mouse button";
  78. }
  79. else if(event->button() == Qt::LeftButton){
  80. qDebug() << "click with the left mouse button";
  81. }
  82. else{
  83. qDebug() << "click with the whell button";
  84. }
  85. QGraphicsItem::mousePressEvent(event);
  86. }
  87.  
  88. void frame::setFramePosMiddle(qreal x, qreal y)
  89. {
  90. this->setPos(x-128/2,y-128/2);
  91. }
  92.  
  93. void frame::setFrameRotation(qreal frameRotation)
  94. {
  95. this->frameRotation=frameRotation;
  96. update();
  97. }
To copy to clipboard, switch view to plain text mode 

Works fine now, but if i rotate the polygon again....it does not also turn the changed bounding rect to the angle.....
which results that there are 2 Polygons, one which is turned and the one which the system referes.
clicking the mouse works with the one from the system....which does not overlay with the rotated one...

I am so close to get that done to.....any idea to fix this little thing now.
Maybe there is evern another function to rotate the polygon and the system bounding rect in one piece....

Thanks for the link