joseph
14th December 2006, 13:28
hai All
I am still facing some problem with ALIGNMENT ( cell_data in QTable) while am trying to include QCheckTableItem as cell_data in QTable
This is the class i have created to support Left alignment in QTable
class MyTableItem : public QTableITem
{
QString m_strAlign ;
public :
-----
-------- // other constructors support pixmap, text..etc
// new constructor which support QCheckTableItem in Cell_Data
DWCTableItem( QTable * table,
EditType editType,
const QCheckTableItem * chkTableItem,
const QString & AlignSpec = "LeftCenter" )
: QTableItem ( table, editType ) , m_strAlign ( AlignSpec )
{
}
virtual alignment() const
{
---
---// after some process
---
return Qt::AlignLeft ;
}
};
In run time am calling this as follows.....
-----------------
QTable *myTable = new QTable(.... );
QCheckTableItem *myCheckTableItem = new QCheckTableItem ( myTable, "SomeText" );
myTable->setItem ( row, col, new MyTableItem(
myTable,
QTableItem::Never,
myCheckTableItem ) );
------------------
After this QTable is not showing any thing in that cell , where we used the funciton
myTable->setItem ( row, col, new MyTableItem(
myTable,
QTableItem::Never,
myCheckTableItem ) );
Please tell me whether am using the appropriate constructor of QTableITem in MyTableITem...??
please tell me what's wrong with this...!!
Thanks in advance
I am still facing some problem with ALIGNMENT ( cell_data in QTable) while am trying to include QCheckTableItem as cell_data in QTable
This is the class i have created to support Left alignment in QTable
class MyTableItem : public QTableITem
{
QString m_strAlign ;
public :
-----
-------- // other constructors support pixmap, text..etc
// new constructor which support QCheckTableItem in Cell_Data
DWCTableItem( QTable * table,
EditType editType,
const QCheckTableItem * chkTableItem,
const QString & AlignSpec = "LeftCenter" )
: QTableItem ( table, editType ) , m_strAlign ( AlignSpec )
{
}
virtual alignment() const
{
---
---// after some process
---
return Qt::AlignLeft ;
}
};
In run time am calling this as follows.....
-----------------
QTable *myTable = new QTable(.... );
QCheckTableItem *myCheckTableItem = new QCheckTableItem ( myTable, "SomeText" );
myTable->setItem ( row, col, new MyTableItem(
myTable,
QTableItem::Never,
myCheckTableItem ) );
------------------
After this QTable is not showing any thing in that cell , where we used the funciton
myTable->setItem ( row, col, new MyTableItem(
myTable,
QTableItem::Never,
myCheckTableItem ) );
Please tell me whether am using the appropriate constructor of QTableITem in MyTableITem...??
please tell me what's wrong with this...!!
Thanks in advance