[PyQt] Parent/Child widget clipping
hpj at urpla.net
Mon Jan 30 23:30:19 GMT 2012
On Tuesday 31 January 2012, 00:07:24 James Polk wrote:
> Greetings All,
> Doing some prototyping where I have a simple QTreeWidget with 3
> items. Each item has 3 simple children.
> Using QTreeWidget.setItemWidget()....I "set/insert" a simple
> QTableWidget into a child of one of the tree's parent items (first
> The problem is that the "child-table" width is wider than the
> "parent-tree"'s first column, so that parent-tree->column2 clips the
> This phenomena is pretty much identical to this example on
> stackoverflow (last pix)
> However, in that example, the problem is "solved" by manually (or
> could be automatic) resizing of the parent columns by simply pulling
> it wider,etc..
> But in my prototype, I need the entire "child-table" to display in
> it's entirety but I need the columns of the "parent-tree" to remain
> the same width.
> In other words, I need to override the default behaviour of having
> the tree define the child's display region.
Excuse me, but I still don't get, what you really want to archive.
If you want your table span the full tree widget width, try this after
More information about the PyQt