Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2007
QTreeWidget : hiding sort arrow ?


Message 1 in thread

Is it possible (while sorting is enabled), to hide the sorting arrow  that
shows on column header ?

--
 [ signature omitted ] 

Message 2 in thread

> Is it possible (while sorting is enabled), to hide the sorting arrow  that
> shows on column header ?

Access the header via QTreeView:header() and use
QHeaderView::setSortIndicatorShown(false) to make the sort indicator
disappear.

-- 
 [ signature omitted ] 

Message 3 in thread

J-P Nurmi wrote:

>> Is it possible (while sorting is enabled), to hide the sorting arrow 
>> that shows on column header ?
> 
> Access the header via QTreeView:header() and use
> QHeaderView::setSortIndicatorShown(false) to make the sort indicator
> disappear.
> 
Nice, thanks

--
 [ signature omitted ] 

Message 4 in thread

J-P Nurmi wrote:

>> Is it possible (while sorting is enabled), to hide the sorting arrow 
>> that shows on column header ?
> 
> Access the header via QTreeView:header() and use
> QHeaderView::setSortIndicatorShown(false) to make the sort indicator
> disappear.
> 

Well, I was too prompt to greet : now the list is not sortable anymore :'(

--
 [ signature omitted ] 

Message 5 in thread

> Well, I was too prompt to greet : now the list is not sortable anymore :'(

You may want to switch to QTreeView and a (custom) model; there the sort 
indicator and the actual sorting can be handled separately. Or perhaps 
you can tweak your style to show the indicator as an empty bitmap.

Martin

-- 
 [ signature omitted ]