Below is some code that puts a check box in the first colum of a TableWidget. They are entered nicely in the column, but I have two questions:

Qt Code:
  1. for (int i = 0; i < list.size(); ++i)
  2. {
  3. fileTable->setRowCount(j+1);
  4. QCheckBox *inserter = new QCheckBox();
  5. fileTable->setCellWidget(j,0,inserter);
  6. }
To copy to clipboard, switch view to plain text mode 

1st, how do I align the check boxes to the centre, the only thing i see is for text.

2nd (and more important), I'm not sure how to acces these now. I want to connect them, so that when one is checked, it sends a signal like:

connect( checkbox , SIGNAL( toggeled(bool) ), this, SLOT( getType() ) );

What do I put for checkbox, above? It was created when another signal was called to populate the table.... I'm not sure if I'm being clear.