I fill my QGraphicsTextItem with QTextDocument text image and all style i rotate this floating text and image like other paint. Now i like to lock the text and on qmenu , i swap QGraphicsTextItem to other flag ...
Why the parent can write inside? and paint this objekt? parent is only QGraphicsScene..!

how i can solve this?

My enum is valid and display correct¨!

Qt Code:
  1. /* class FloatDiagram : public QGraphicsTextItem */
  2. /* FloatDiagram( const GenAttribute &p , QMenu *Diss , QGraphicsItem *parent, QGraphicsScene *scene ) */
  3.  
  4. void FloatDiagram::FloatLock()
  5. {
  6. setOpenExternalLinks(true);
  7. setTextInteractionFlags(Qt::NoTextInteraction);
  8. setTextInteractionFlags(Qt::LinksAccessibleByMouse);
  9. setTextInteractionFlags(Qt::TextBrowserInteraction);
  10. modus = MODUS_LOCK; /* enum write protect not move only click link */
  11. }
  12.  
  13. void FloatDiagram::FloatUnLock()
  14. {
  15. setFlag(QGraphicsItem::ItemIsMovable, true);
  16. setFlag(QGraphicsItem::ItemIsSelectable, true);
  17. setTextInteractionFlags(Qt::NoTextInteraction); /* edit on double click if not lock */
  18. modus = MODUS_MOVE; /* enum to move and edit */
  19. }
To copy to clipboard, switch view to plain text mode