Hi!

I'm setting a QTableWidget in a QTreeWidget, but the size of the table is the size of the cell of the tree (i.e. is too small) and the table doesn't fit, so i put the minimumHeight to the tableWidget bigger, now it appears but it appears on top of the other cells in the tree .
Here is the code

Qt Code:
  1. TableStruct t = ::getTable();
  2.  
  3. QTableWidget* tableWidget = new QTableWidget;
  4. tableWidget->setRowCount(t.getRowCount()); tableWidget->setColumnCount(t.getColumnCount());
  5. tableWidget->setHorizontalHeaderLabels(t.getColumnNames().toList());
  6.  
  7. QVector data = t.getData();
  8. int i = 0;
  9. for( int row = 0; row < t.getRowCount(); ++row)
  10. for( int col = 0; col < t.getColumnCount(); ++col, ++i )
  11. tableWidget->setItem(row,col,new QTableWidgetItem(data.at(i)));
  12.  
  13. ui.treeWidget->setItemWidget(item,1,tableWidget);
To copy to clipboard, switch view to plain text mode 

I looks like this:
snap01.jpg

Now if i add
Qt Code:
  1. tableWidget->setMinimumHeight(50*t.getRowCount());
To copy to clipboard, switch view to plain text mode 

It looks like:
snap02.jpg

Any help.

thanks.