[Qt-interest] QHeaderView: mouse click at intersection of two columns

Manab manab at softjin.com
Mon Apr 5 15:16:49 CEST 2010


Hi,

I've to either resize or sort a column based on mouse click on 
QHeaderView. I've to use different user defined sorting functions for 
different columns.
So, I've derived MyHeaderView from QHeaderView and wrote the following code:

void MyHeaderView::mousePressEvent(QMouseEvent* event)
{
     int index = logicalIndexAt(event->pos());
    .......
}

Using the above code I can determine the section index properly. 
However, I need to know whether mouse was clicked at the intersection of 
two column headers, in which case only resize will happen not sorting.

Please, let me know, how can I determine, whether mouse is clicked at 
the *intersection *of two column headers.

Thanks,
Manab


Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100405/0fe60b8a/attachment.html 


More information about the Qt-interest-old mailing list