Hi.
Im starting to use Qt, and after installation/building/starting_project probelm i have a problem for which i can't find solution searching the forums..

I need to add a (right mouse button click) menu to QTableWidget, but i can't get it working.
Qt Code:
  1. frmSettings::frmSettings(QWidget *parent)
  2. : QDialog(parent)
  3. {
  4. ui.setupUi(this);
  5.  
  6. context= new QMenu(this);
  7. context->addAction("Add");
  8. context->addAction("Delete");
  9.  
  10. connect(ui.tableOptimizationVariables, SIGNAL(customContextMenuRequested(QPoint* position)), SLOT(frmSettings::ProvideContexMenu(position)));
  11. }
  12. void frmSettings::ProvideContexMenu(const QPoint* position)
  13. {
  14. context->exec(*position);
  15. }
To copy to clipboard, switch view to plain text mode 

tableOptimizationVariables is QTableWidget

Thanx