Quote Originally Posted by harmodrew View Post
because the matrix of buttons is indexed with two integers...
Qt Code:
  1. int x,y;
  2. QString id = QString("%1-%2").arg(x).arg(y);
  3. // in the slot:
  4. int x, y;
  5. QStringList tmp = id.split("-");
  6. x = tmp.at(0).toInt();
  7. y = tmp.at(1).toInt();
To copy to clipboard, switch view to plain text mode 
or you create a local
Qt Code:
  1. QHash< QString (id), QPair< int (x), int (y) > > mapping;
To copy to clipboard, switch view to plain text mode 

I have the problem of choosing the value that has to be assigned to a button depending on the selected tool...
but you can surely access that information from your slot! there must be a pointer in your class, beside how would you do it when creating the connection, if you have there access you also have it in your slot.