Hello, here I am again! 
I'm trying to connect the clicked() events of the buttons of a QPushButton matrix with a custom function. The problem is that the function needs the indexes of the clicked button...in the connect() reference is told that I cannot do such a thing:
for (int i=0; i<nrow; i++)
for (int i=0; i<nrow; i++)
for (int j=0; j<ncol; j++)
p[i][j].connect(&p[i][j],SIGNAL(clicked()), actObj, SLOT(triggerFunc(int i, int j)));
QPushButton **p;
p = new QPushButton*[nrow];
for (int i=0; i<nrow; i++)
p[i] = new QPushButton[ncol];
for (int i=0; i<nrow; i++)
for (int j=0; j<ncol; j++)
p[i][j].connect(&p[i][j],SIGNAL(clicked()), actObj, SLOT(triggerFunc(int i, int j)));
To copy to clipboard, switch view to plain text mode
actObj is an object which holds the slot triggerFunc(int, int).
I need to index the button of p that was clicked and call the triggerFunc() function using i and j properly...are there other ways to connect a widget, object, button, etc, with a function?
thanks again
Bookmarks