PDA

View Full Version : How to customize horizontal header (diagonal header view)



vairamuthu.g
1st September 2008, 12:28
I have a requirement in my project viz. the horizontal header data has to be displayed diagonally. Can any one please let me know, how to do this customization?

What I tried was,

Subclassed the QHeaderView and reimplementing the paintSection.
I can draw skewed / angled lines. But there are no grippers for that line to move the header. How to acheive this?

I could not place the text properly in each header column. How do I acheive this?

Can any one help me with a sample code for this?

wysota
1st September 2008, 14:18
You will probably need to handle all the events yourself - mainly mouse events.

vairamuthu.g
4th September 2008, 14:08
You will probably need to handle all the events yourself - mainly mouse events.
Somehow I could acheive the angled lines in the horizontal header. But when I move the mouse over the header, the angled lines are getting wiped off and it is not happening for the text in the header section. How should I fix this? What we need to handle in the mouse move events? Can I have a example or some snippet of code?

And how to make the horizontal header sections, clickable? (The vertical header sections are behaving like push buttons and it is not happening for the customized Horizontal header view). How to acheive this?

aamer4yu
4th September 2008, 14:48
Doesnt QHeaderView::setClickable work for u ?

vairamuthu.g
4th September 2008, 15:59
No set clickable didn't work.