[PyQt] Parent/Child widget clipping
Hans-Peter Jansen
hpj at urpla.net
Wed Feb 1 23:08:15 GMT 2012
On Wednesday 01 February 2012, 20:47:01 JPolk wrote:
> ...not sure if this is the proper or elegant way, but I found a
> workaround....by setting minWidth and minHeight
>
> self.widget.setMinimumWidth(minW)
> self.widget.setMinimumHeight(minH)
>
> ...then, once inserted into the TreeWidget, it retains it's height,
> and isn't clipped...
That's perfectly fine, James. It's the other way around - if you start
using setGeometry for ui elements (not windows), something is
conceptually broken in your code. Badly.
We're using layout manager for a reason. You don't *want* to know their
innards, unless you have a strong masochistic background. Do you?
Pete
More information about the PyQt
mailing list