[PyQt] Whitespaces inside table widget

Hans-Peter Jansen hpj at urpla.net
Mon Jan 31 13:56:06 GMT 2011


On Monday 31 January 2011, 12:51:38 disconnext wrote:
> I have a QTableWidget in layout. And I want it to change it's size
> with the addition of a new row, leaving no whitespaces inside table
> widget. (Row added, layout cell expanded.)
>
>         posLayout = QVBoxLayout()
>         posLayout.addWidget(posTitle)
>         posLayout.addWidget(posTable)
>         posLayout.addWidget(posTotal)
>   ?     posLayout.addStretch()
>
> Layout itself has a height not affected by the table. So when the
> stretch -> 0, the scrollbar appears instead of table expansion.
>
> Is there any "right way" to make it work?
> Or how can I calculate the my desired table size without whitespaces?

Your description is a bit sparse, e.g. on the targeted context. Either 
search the ML for solutions, or provide a minimum example demonstrating 
your issue. 

Pete


More information about the PyQt mailing list