[vtkusers] How to add vtkRenderWindowInteractor to a native Cocoa window
Elvis Dowson
elvis.dowson at mac.com
Sun Oct 26 15:10:41 EDT 2008
Hi,
I managed to find a solution, but I'm not so sure about the
performance of my solution, mainly if the following call sequence the
absolute bare-minimum and efficient way to get what I want to do.
The code fragment works, however, and it is able to differentiate
between a QGraphicsItem in a scene and the VTK background.
Best regards,
Elvis Dowson
// Description:
// Overloaded virtual method for handling mouse press events.
void QVTKGraphicsView::mousePressEvent(QMouseEvent* event)
{
if(!this->scene()->focusItem())
{
emit mousePressEvent1(event);
this->scene()->update();
QGraphicsView::mousePressEvent(event);
}
else
{
QGraphicsView::mousePressEvent(event);
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081026/7b3bd8de/attachment.htm>
More information about the vtkusers
mailing list