[PyQt] TableWidget: stretch factor
Hans-Peter Jansen
hpj at urpla.net
Sat Jan 14 11:51:26 GMT 2017
[Again, please don't play Reply-To games!]
On Freitag, 13. Januar 2017 08:01:09 Rich Shepard wrote:
> I've read that a widget should have a stretch factor which, for a table
> widget, should allow me to set relative sizes for each column. I'm not
> finding this stretch factor in the Property Editor.
>
> The section in which I thought I'd find this adjustment, QTableWidget,
> does not appear to have this. I do see a a Horizontal Stretch under Size
> Policy, but that has only a single value.
>
> Please point out what I've done incorrectly. The .ui file is attached and
> the last three tabs each have a table widget. I'd like to expand the
> right-most column to fill the empty area.
You do that in your code, check Qt-Assistant for API. Btw, *all* you container
widgets are missing a layout.
Pete
More information about the PyQt
mailing list