Background / pre-condtion :
For now, I had implemented a QTabWidget control. meanwhile, I also provide the context operation (mouse right click menu),and it had run successfully.
I append the action ("Remove") into the prior menu and implement the SLOT function for this action.
Because QTabWidget has a default item is 0, When I trigger the Context event. How does the QTabWidget know that current index.
At here, the only clue is the QPoint pt = QCursor::pos(); If I can verify which widget is I request via pt. The issue should be easy.
Pls help me solve this. I will appreciate you!!
BTW:
you just implement this method: int IsInWidget(QWidget* pwidget, QPoint pt);
return value means current index of QTabWidget control,
pWidget means specified Widget. pt means specified point coordinate.