qt-interest@trolltech.com
[Top] [All Lists]

QTreeView, scrolling and single column...[Qt4.1.1]

Subject: QTreeView, scrolling and single column...[Qt4.1.1]
From:
Date: Tue, 7 Mar 2006 12:10:04 -0800

Folks,

We've got a QTreeView with a hierarchy of items and there is only one column. This QTreeView is placed into a dock widget and it looks fine. But, as the tree is expanded, the text of the items are displayed as elided (e.g.  Foo..., Illog...). We are using a custom delegate and the text width is computed properly and it is within the drawDisplay routine that the text is elided.

Our question is how can we turn off this behavior? We want the QTreeView to scroll horizontally for the item text, not truncate. I would think that a QTreeView with one column would allow scrolling within the 'column'.

I have tried calling resizeColumnToContents() when the tree is expanded and that does compute a wider column width, but still no scroll bar appears.  In trying the simpletreemodel example, only when the window is small enough to hide the second column does the horizontal scroll appear.

Any clues would be helpful,

thanks,

bob pizzi
ni.com
<Prev in Thread] Current Thread [Next in Thread>
  • QTreeView, scrolling and single column...[Qt4.1.1], Bob . Pizzi <=