PDA

View Full Version : setExpanded changes text size automatically



Sorath
8th September 2015, 13:25
Hi,

I have a pretty complex code but will try to explain the problem.

I have this line:

self.expandedView = self.lightListerTree.setExpanded(index, True)
this line is in the createUI part of the code

which when on my text resizes to standard view.
Or probably this line
self.lightListerTree.resizeColumnToContents(index) will get ignored or overwritten.
I have to add this line is somewhere else in my code.


If I comment the self.expandedView line my custom treeView is collapsed by default but when I enter in all the entries they are correctly resized to the column.
when I uncomment the self.expandedView line and add the resizeColumn directly under it, the tree is automatically collapsed, and I tried lots of different things
as soon as I put something under the expanded View line the tree is not getting expanded, also other way around, if I put the expandedLine anywhere else in my code
to force expanding, it doesn't work.

It's like either of the two commands work, but not both together.
Is this maybe a feature, that expandView is resizing back the columns to normal or that the resizeColumn command automatically collapses the tree?

I'm trying for hours already all kind of combinations, but completely lost.

any ideas welcome.
best,
Bastian