can u explain a bit more ... i m new to qt and not able to get how to do it.

i made a new class QGrid inherited QTablewidget in it.

now how to get the individual cell dimension in it.

rect is a inherited function of QTableWidget, but not of QTableWidgetItem, so how to get the dim. of cell.

//class declaration.

Qt Code:
  1. class QGrid : public QTableWidget
  2. {
  3. public:
  4. QGrid(int x,int y,QWidget *parent = 0);
  5. }
To copy to clipboard, switch view to plain text mode 

//implementation

Qt Code:
  1. QGrid *table = new QGrid(5,5); //this creates a table
  2.  
  3. for(int i=0;i<5;i++)
  4. {
  5. for(int j =0;j<5;j++)
  6. {
  7. t->setText("");
  8. table->setItem(j,i,t);
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 

where can i get the cell dimensions to make the boundry darker if selected.

if i m going wrong .... please correct it ...