[Qt-creator] Mouse release and mapping (x,y) to slice (i,j)

Abdelkhalek Bakkari bakkari.abdelkhalek at hotmail.fr
Mon Nov 7 14:59:17 CET 2016

Dear QT users,

I am using QT and VTK. I created a mouse release method to use it inside a QVTKWidget :

void MyQVTKWidget::mouseReleaseEvent(QMouseEvent* event)


if (pMainWindow)

    ((MainWindow *)pMainWindow)->myMouseReleaseEvent(event);

    // call the super class to avoid troubles



Now, I would like to map (x,y) to slice (i,j). Generally, mouse position should be mapped into ( i, j) of current slice. It depends on the zoom factor, aspect ratio of the slice and the window size.

But, I am wondering about how can I solve this issue.

Thanks in advance!

Best regards,

Abdelkhalek Bakkari
Ph.D candidate in Computer Science
Institute of Applied Computer Science
Lodz University of Technology, Poland

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20161107/9a0c060f/attachment.html>

More information about the Qt-creator mailing list