PDA

View Full Version : Selectable header columns



eekhoorn12
9th November 2009, 16:33
Hi all

I have an application in which I have a QTreeview.

In this treeview I want the columns that are shown to be selectable, like you can do in windows if you have a folder with mp3's you can put your mous on the header, right click and select the columns that are shown.

I want to do this in my application. I have found the option setColumnHidden in the treeview options but I don't know how to make the right mouse function on the header. Right now when I click on the header with my right mouse button I see the context menu for the entire widget but I want a context menu with the columns so that I can select which ones are shown.

Regards
Eekhoorn12