PDA

View Full Version : TreeView used in Qt Designer New Form dialog?



Bitruder
6th May 2009, 21:01
I have a tree model and I want the top level items to look different from those below it. Specifically, the new form dialog in Qt Designer has a tree view with exactly this (see screenshot). How can I replicate this? I've looked through the Qt Designer source code, but I can't pin down what widget that is.

Thanks!

http://img136.imageshack.us/img136/6459/screenshotxjn.png

wysota
6th May 2009, 22:03
It's a QTreeView or QTreeWidget with a custom delegate that uses QStyle::drawPrimitive() to render the button-like looks of top level items.

aamer4yu
6th May 2009, 22:40
This thread (http://www.qtcentre.org/forum/f-qt-programming-2/t-how-can-i-create-a-widget-list-as-qt-designer-20610.html) might be of interest to you :)