Quote Originally Posted by Kapil
i have not used boundingRect() function for the lines anywhere to find the bounding boxes..
Nevermind, Q3CanvasLines::areaPoints() will be used to detect collision for lines.

Quote Originally Posted by Kapil
Now the problem is no matter which canvas item i click, it enters the first 'if' and highlights the 0th item...
And what item it should highlight? Maybe you should skip the "else" keyword?

I don't see much sense in this part:
Qt Code:
  1. startPoint = m_pCLineGlobalOutY[i]->startPoint();
  2. endPoint = m_pCLineGlobalOutY[i]->endPoint();
  3. m_pCLineGlobalOutY[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
To copy to clipboard, switch view to plain text mode 
Haven't you messed the variable names somewhere?