Hallo Leute,
ich versuche ein connect für ein QContextMenu einer Tabelle herzustellen, aber es erfolgt einfach keine Verbindung. Hier ist der Code:
im Header:
private slots:
void slotContextMenu( int, int, const QPoint&);
in der cpp-Datei:
...
connect( table, SIGNAL( contextMenuRequested ( int, int, const QPoint& ) ), this, SLOT( slotContextMenu(int, int, const QPoint& ) ) ) ;
...
void CHPIntensityWidget::slotContextMenu(int row, int col, const QPoint &point)
{
QPopupMenu *contextMenu = new QPopupMenu( this );
....
contextMenu->exec( point );
delete contextMenu;
}
Ich weiß nicht genau, wie und ob ich "const" und "&" verwenden muss. Ich habe auch schon alle möglichen Kombinationen ausprobiert (ohne &, ohne const, etc).
Vielen Dank,
Lesezeichen