PDA

View Full Version : Get rid of the frame around items in the QTreeView



THRESHE
10th December 2008, 17:18
Hi everybody.
I've a problem with QTreeView. When I click on the item in TreeView a grey frame around it.
How can I get rid of it? Btw it only appears on Windows there is no sign of it on the Mac

jpn
10th December 2008, 17:26
Well, it's the standard way to indicate that the corresponding item has focus. Would setting QTreeView::allColumnsShowFocus to false suit you? If you don't want the whole view to accept focus at all, you can set QWidget::focusPolicy to Qt::NoFocus.

THRESHE
10th December 2008, 17:43
Thanks ;)
Setting QTreeView::allColumnsShowFocus to false didn't help but setting it to true helped :)

jpn
10th December 2008, 18:00
Thanks ;)
Setting QTreeView::allColumnsShowFocus to false didn't help but setting it to true helped :)
No problem. Oops, yeah that's what I meant... ;)