PDA

View Full Version : add Context menu QHeader



deepal_de
6th June 2011, 09:40
is it possible to add a context menu for QHeader??
i have a QTreeWidget..i wont to add context menu on right click event of the header..
can this be done..
if someone has done this can you please post a example
thanks..

high_flyer
8th June 2011, 15:07
You probably mean QHeaderView.
And yes this is possible, since QHeaderView is a QWidget.
See QWidget::customContextMenuRequested ( const QPoint & pos ) signal.