[PyQt] Minimum column width for 'QTableView'

sbremal at hotmail.com sbremal at hotmail.com
Thu Mar 15 17:06:38 GMT 2012

Actually, what I am looking for is a function like:
model.horizontalHeader().setMinimumSectionSize(column_index, xxx)
i.e. minimum section size _per_ column but not per table.
Any idea?

> From: sbremal at hotmail.com
> To: pyqt at riverbankcomputing.com
> Date: Thu, 15 Mar 2012 15:11:25 +0000
> Subject: [PyQt] Minimum column width for 'QTableView'
> Hello
> wonder if there is an easy way to tell 'QTableView' what the minimum column width should be.
> 'resizeColumnsToContents' does not really do what we want. Often we start with an empty table and in this case 'resizeColumnsToContents' would make the columns too narrow. The same applies when we have a filter set on the table, and only a few rows with relatively short values are listed, we still want to have enough space when a new row is added.
> Any help would be appreciated.
> Cheers
> B. 
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt 		 	   		  

More information about the PyQt mailing list