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¨!
/* class FloatDiagram : public QGraphicsTextItem */
/* FloatDiagram( const GenAttribute &p , QMenu *Diss , QGraphicsItem *parent, QGraphicsScene *scene ) */
void FloatDiagram::FloatLock()
{
setOpenExternalLinks(true);
setTextInteractionFlags(Qt::NoTextInteraction);
setTextInteractionFlags(Qt::LinksAccessibleByMouse);
setTextInteractionFlags(Qt::TextBrowserInteraction);
modus = MODUS_LOCK; /* enum write protect not move only click link */
}
void FloatDiagram::FloatUnLock()
{
setTextInteractionFlags(Qt::NoTextInteraction); /* edit on double click if not lock */
modus = MODUS_MOVE; /* enum to move and edit */
}
/* class FloatDiagram : public QGraphicsTextItem */
/* FloatDiagram( const GenAttribute &p , QMenu *Diss , QGraphicsItem *parent, QGraphicsScene *scene ) */
void FloatDiagram::FloatLock()
{
setOpenExternalLinks(true);
setTextInteractionFlags(Qt::NoTextInteraction);
setTextInteractionFlags(Qt::LinksAccessibleByMouse);
setTextInteractionFlags(Qt::TextBrowserInteraction);
modus = MODUS_LOCK; /* enum write protect not move only click link */
}
void FloatDiagram::FloatUnLock()
{
setFlag(QGraphicsItem::ItemIsMovable, true);
setFlag(QGraphicsItem::ItemIsSelectable, true);
setTextInteractionFlags(Qt::NoTextInteraction); /* edit on double click if not lock */
modus = MODUS_MOVE; /* enum to move and edit */
}
To copy to clipboard, switch view to plain text mode
Bookmarks