PDA

View Full Version : Two-row header for QTreeWidget



wetzel
27th May 2006, 12:14
Hi,

I would like to extend header of a QTreeWidget with a second row
containing QLineEdit Widgets.
This is for a database interface where the result should be displayed as a tree:

normal header : [name] [christian name] [day of birth] ...
qlineedit widgets : [....] [..............] [............]
treewidgetitem text text text
treewidgetitem text text text

I have different ideas like hiding the QTreeWidget header and make my own
one using two hboxlayouts. But maybe there is a more elegant solution (I'm pretty
new to GUI programming).

Best regards,
Christian

wysota
27th May 2006, 13:26
As QHeaderView is not a full featured model-view enabled class, you'll have to either subclass QHeaderView and implement those lineedits yourself there (shouldn't be very hard) or don't bother doing that and simply use the first row of the view for those line edits.