I don't know the principle of how the dashed-line frame is shown very clearly.
I just set the flag "ItemIsSelectable" to Item in construct function:
{
ShapeName=Name;
FileName=File;
myMode=mode;
myContextMenu=ContextMenu;
}
SvgShapeItem(QString &Name,QString &File,Mode mode,QMenu *ContextMenu,QGraphicsItem *parent=0): QGraphicsSvgItem(File,parent)
{
ShapeName=Name;
FileName=File;
myMode=mode;
myContextMenu=ContextMenu;
setFlag(QGraphicsItem::ItemIsMoveable,true);
setFlag(QGraphicsItem::ItemIsSelectable,true);
}
To copy to clipboard, switch view to plain text mode
and i have no other codes to select or deselect the item.I dont konw how?
Need i do something else?
Thanks a lot for your reply!
Bookmarks