Thanks for the help man. You have pointed me in the right direction which has helped alot.
{
Q_OBJECT
public:
int mynewvariable();
void setmynewvariable(int a);
};
class TileItem : public QObject, public QGraphicsPixmapItem
{
Q_OBJECT
public:
int mynewvariable();
void setmynewvariable(int a);
};
To copy to clipboard, switch view to plain text mode
Then for the setmynewvariable function:
void TileItem::setmynewvariable(int a)
{
this->mynewvariable = a;
}
void TileItem::setmynewvariable(int a)
{
this->mynewvariable = a;
}
To copy to clipboard, switch view to plain text mode
But whenever i try to add this item to my graphicsscene:
TileItem *pix;
scene->addItem(pix);
TileItem *pix;
scene->addItem(pix);
To copy to clipboard, switch view to plain text mode
It simply will not allow me. It crashed the whole program. Is there something i am overlooking?
Thanks again for the help,
Matt
Bookmarks