qt - mouseReleaseEvent() for QVTKWidget -


i using qt , vtk. tried create method below:

void mainwindow::mousereleaseevent ( qmouseevent * event ) {       if (!seedsmode)         return;     qmessagebox *msgbox = new qmessagebox(); // <-- never called...dont know why     msgbox->setwindowtitle("hello");     char msg[30];     sprintf(msg, "you clicked on %d %d", event->pos().x(), event->pos().y());     msgbox->settext(msg);     msgbox->show();       if (event->button() == qt::leftbutton )     {            msgbox = new qmessagebox();         msgbox->setwindowtitle("hello");         msgbox->settext("you clicked left mouse button");         msgbox->show();          // adding seed (mouse click) current slice         // but, have map x,y slice position         // affine transformation         seeds[currentslice].push_back(event->pos());          //delete msgbox;     }  } 

my target create seed points mouse click on qvtkwidget. but, using method can done. me, please?


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -