Hi mates!

I added a popup menu to a QTableWidget, but position seems wrong, I guess is because I have a vertical and/or horizontal header. I think if I add header lenght, would be enoungh, but is there any other more generic solution?

Qt Code:
  1. void CSequencesDialog::popupSequences(const QPoint &pos) {
  2. QWidget* widget=qobject_cast<QWidget *>(QObject::sender());
  3. if (widget!=NULL)
  4. m_popupSequences->popup(widget->mapToGlobal(pos));
  5. }
To copy to clipboard, switch view to plain text mode 

Thanks for help.