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 column) The problem is that the "child-table" width is wider than the "parent-tree"'s first column, so that parent-tree->column2 clips the child-table. This phenomena is pretty much identical to this example on stackoverflow (last pix) http://stackoverflow.com/questions/6133367/qtreewidget-with-multiple-columns-limits-number-of-child-items 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. I've tried several things...all to no avail... I chose to use Tree/Table-Widgets this time, instead of Tree/Table-Views....would the "views" method perhaps solve this dilemma? If there's no way to solve this directly....any thoughts about "constraining" the position of a widget to another widget?...bypassing the parent/child relationship in favor of functionality that would "snap" a table widget's position to a marker, or anchor on the tree widget? Sounds crude, I know...but trying to figure out any workaround... Would doing something like "setItemLayout" (instead of setItemWidget) yield a layout that would paint over it's parent?....(albeit I can't seem to find a function like "setItemLayout", lol) Any and all suggestions or solutions or workarounds are greatly appreciated.. Cheers, Jim (Simple example attached)
example2.py
Description: Binary data
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt