
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.

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:
startPoint = m_pCLineGlobalOutY[i]->startPoint();
endPoint = m_pCLineGlobalOutY[i]->endPoint();
m_pCLineGlobalOutY[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
startPoint = m_pCLineGlobalOutY[i]->startPoint();
endPoint = m_pCLineGlobalOutY[i]->endPoint();
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?
Bookmarks