PDA

View Full Version : Unable to update QTableWidget which is on Different QWidget from MainWindow



sagar.mangalwedhekar
12th March 2010, 06:35
Hi ,
I have One QTableWidget which is on Seperate QWidget form and i am not able to update QTableWidget.
Actually i am trying to make this Qtable as a seperate component which i can put on different Tabs.
One code snippet shows that it will get updated in a constructor of that QWidget.



Please Help Me,

Thanks N Regerds,
sagar

Lykurg
12th March 2010, 07:07
I am not sure if I get you right, but when you have a table inside an other widget and you want to access the table you have to provide a) a function which returns a pointer the the table, with which you can alter the table or b) (much better) provide setter functions like:
void YourWidget::setItem ( int row, int column, QTableWidgetItem * item )
{
m_InternalPointerToYourTable->setItem(row, column, item);
}