QTreeView: Emulating Mac's native look
How can I emulate the background of a selected row like the one in the left of uTorrent?
I am not sure what you are seeing now. What you could try is:
explicitly set the delegate to use QStyledItemDelegate for the tree. If that doesn't work:
also set a style sheet for QTreeView::item, where you can set the background property to a Qt::LinearGradientPattern with the right colors.
I emulated the look using the following stylesheet
@background-color: rgb(222, 228, 234);
selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgb(110, 165, 218), stop: 1 rgb(33, 108, 183))@
Please have a look at the "Mac Main Window Demo":http://developer.qt.nokia.com/doc/qt-4.7/demos-macmainwindow.html - it shows how to create main window applications that has the same appearance as other Mac OS X applications, including customizing the item view, the splitter and a search field and should be exactly what you need
Thanks Volker! That article is truly helpful!