Results 1 to 2 of 2

Thread: Concerning the look and feel customization via CSS from the Qt’s widgets

  1. #1
    Join Date
    Jan 2008
    Location
    Germany
    Posts
    80
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Concerning the look and feel customization via CSS from the Qt’s widgets

    I found the style sheet reference at http://doc.trolltech.com/4.4-snapsho...reference.html somehow confusing about the possibilities to customize the sub-controls of a widget.

    I would like to remove the dashed border of the text surrounding a QAbstractItemView, used in a QTreeWidget, when selected. The style sheet reference tells to use the ::item subcontrol for more fine grained control over the items in the QTreeView but also that ::text is the text of a QAbstractItemView.

    So I’ve tried (without success) the following both possibilities:

    QTreeView::text:selected:active {
    border: 0px;
    }

    QTreeView::item::text:selected:active {
    border: 0px;
    }

    Does someone has an idea ?
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Concerning the look and feel customization via CSS from the Qt’s widgets

    The border is there not because of selection but because the item has focus. It has nothing to do with text either. I'm not sure if you can do that using style sheets. But you can provide your own delegate for the view that will simply skip drawing the focus.

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.