Hello Friends,

how can I get the widget from a point when I make a custom context.


I have a groupox with many lineedits and when I link all edits to the same action I have to differentiate.
this does not the trick. I think I get the points in relation to the lineedit and not to the Qmainwindow or???

Qt Code:
  1. void Project::setSaveForAllProjectsTriggered()
  2.  
  3. {
  4. QString test=this->childAt(this->m_contextTriggerPoint)->objectName();
  5.  
  6. }
To copy to clipboard, switch view to plain text mode 



this is my contextmenu function

Qt Code:
  1. void Project::showContextMenu(const QPoint &position)
  2.  
  3. {
  4.  
  5. QList<QAction *> actions;
  6.  
  7. this->m_contextTriggerPoint=position;
  8. actions.append(actSaveForAllProjects);
  9.  
  10. if (actions.count() > 0)
  11. QMenu::exec(actions, this->mylineedit->mapToGlobal(position));
  12. }
To copy to clipboard, switch view to plain text mode