Results 1 to 4 of 4

Thread: Get rid of the frame around items in the QTreeView

  1. #1
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Get rid of the frame around items in the QTreeView

    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
    Attached Images Attached Images
    • File Type: jpg 1.jpg (13.2 KB, 9 views)
    C++ & AMD forever

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Get rid of the frame around items in the QTreeView

    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.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    THRESHE (10th December 2008)

  4. #3
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Get rid of the frame around items in the QTreeView

    Thanks
    Setting QTreeView::allColumnsShowFocus to false didn't help but setting it to true helped
    C++ & AMD forever

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Get rid of the frame around items in the QTreeView

    Quote Originally Posted by THRESHE View Post
    Thanks
    Setting QTreeView::allColumnsShowFocus to false didn't help but setting it to true helped
    No problem. Oops, yeah that's what I meant...
    J-P Nurmi

Similar Threads

  1. QTreeView and expandable items
    By SiLiZiUMM in forum Qt Programming
    Replies: 6
    Last Post: 29th April 2008, 13:21
  2. Edit items on QTreeView + QDirModel
    By junior0007 in forum Qt Programming
    Replies: 4
    Last Post: 23rd November 2007, 07:16
  3. QTreeView rows (items) StyleSheet
    By Kostanev in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2007, 10:36
  4. Drag & drop items on the same QTreeView
    By wind in forum Qt Programming
    Replies: 2
    Last Post: 11th October 2006, 14:29
  5. How to clear All items on QTreeView ?
    By qintm in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2006, 11:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.