amialobyctakpieknie
7th February 2013, 21:55
Hello,
I have made custom graphics widget with:
QRectF graphicsTask::boundingRect()
{
return QRectF(-50, -50, 100, 100);
}
QPainterPath graphicsTask::shape()
{
QPainterPath path;
path.addEllipse(boundingRect());
return path;
}
but it gets mouse events only on part of shape down and right of center of the item (bottom right quarter of a circle).
How can I make it work on all shape?
I have made custom graphics widget with:
QRectF graphicsTask::boundingRect()
{
return QRectF(-50, -50, 100, 100);
}
QPainterPath graphicsTask::shape()
{
QPainterPath path;
path.addEllipse(boundingRect());
return path;
}
but it gets mouse events only on part of shape down and right of center of the item (bottom right quarter of a circle).
How can I make it work on all shape?