Hi,
what I meant was to create a private variable named xyz (and also it could be named isDown).
...
private:
bool xyz;
YourItem::mousePressEvent(...)
{
xyz = true;
update();
}
YourItem::mouseReleaseEvent(...)
{
xyz = false;
update();
}
YourItem::paint(...)
{
if (xyz)
...//draw flat
else
...//draw 3d
}
...
private:
bool xyz;
YourItem::mousePressEvent(...)
{
xyz = true;
update();
}
YourItem::mouseReleaseEvent(...)
{
xyz = false;
update();
}
YourItem::paint(...)
{
if (xyz)
...//draw flat
else
...//draw 3d
}
To copy to clipboard, switch view to plain text mode
Bookmarks