Set delegate for QTreeWidget header
-
I need to set delegate for QTreeWidget header or make it working with HTML tags using other ways.
I set a delegate for QTreeWidget items using
[code]ui->tree->setItemDelegate(dlgt);[/code]and it works.
But setting a delegate to the header does not work :[code]ui->tree->header()->setItemDelegate(dlgt);[/code]
-
Maybe switch to model/view to implement this.
-
Hi,
Use the Model/View method instead of the Widget will give you more options to control the delegates for every cell. The View does what the name says, shows stuff. The model holds the data and the way it is presented by the view.
Read this: "Model/View doc":http://qt-project.org/doc/qt-4.8/modelview.html