QList<QGraphicsItem*> allItems = scene->items();
QList<Port*> portItems;
Port *portItem = qgraphicsitem_cast<Port*>(item);
if(portItem) portItems << portItem;
}
QList<QGraphicsItem*> allItems = scene->items();
QList<Port*> portItems;
foreach(QGraphicsItem *item, allItems){
Port *portItem = qgraphicsitem_cast<Port*>(item);
if(portItem) portItems << portItem;
}
To copy to clipboard, switch view to plain text mode
Where:
class Port : public QGraphics...Item {
public:
enum { Type = UserType+16 };
int type() const { return Type; }
};
class Port : public QGraphics...Item {
public:
enum { Type = UserType+16 };
int type() const { return Type; }
};
To copy to clipboard, switch view to plain text mode
Bookmarks