0backbone0
24th August 2015, 20:55
Hi,
I am trying to access the last Item that was added to a scene. (custom Item derived from QGraphicsItem)
Setitemtitle is a member Function that takes a QString as Argument. Is there a easy way of using it?
I tried to do it this way, but just get an error: 'class QGraphicsItem' has no member named 'setItemtitle'
scene->items().last()->setItemtitle("Test Node");
The setter and getter functions look like this. The String for the Itemtitle is Private.
QString getIiemtitle() const;
void setitemtitle(const QString &value);
Or is it better to store pointers to the Items in a List or Vector?
I am trying to access the last Item that was added to a scene. (custom Item derived from QGraphicsItem)
Setitemtitle is a member Function that takes a QString as Argument. Is there a easy way of using it?
I tried to do it this way, but just get an error: 'class QGraphicsItem' has no member named 'setItemtitle'
scene->items().last()->setItemtitle("Test Node");
The setter and getter functions look like this. The String for the Itemtitle is Private.
QString getIiemtitle() const;
void setitemtitle(const QString &value);
Or is it better to store pointers to the Items in a List or Vector?