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.
{
public:
QGrid
(int x,
int y,
QWidget *parent
= 0);
}
class QGrid : public QTableWidget
{
public:
QGrid(int x,int y,QWidget *parent = 0);
}
To copy to clipboard, switch view to plain text mode
//implementation
QGrid *table = new QGrid(5,5); //this creates a table
for(int i=0;i<5;i++)
{
for(int j =0;j<5;j++)
{
t->setText("");
table->setItem(j,i,t);
}
}
QGrid *table = new QGrid(5,5); //this creates a table
for(int i=0;i<5;i++)
{
for(int j =0;j<5;j++)
{
QTableWidgetItem *t = new QTableWidgetItem;
t->setText("");
table->setItem(j,i,t);
}
}
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 ...
Bookmarks