hi..

yaa i had read it and used it with the same concept but the problem was there... i would show u those few lines where i had done so...
Qt Code:
  1. Q3CanvasItemList l = m_pCanvas->collisions(item);
  2. selCanItem = l;
  3. for (Q3CanvasItemList::Iterator it= selCanItem.begin(); it!= selCanItem.end(); ++it)
  4. {
  5. if ( (*it)->rtti() == 7 )
  6. {
  7. for(i=0;i<42;i++)
  8. {
  9. if((i<GlobalOutYLineList.size()) && ((*it)->collidesWith(GlobalOutYLineList.at(i))))
  10. {
  11. QMessageBox::information(this, tr("CGUITileType"),tr("GlobalOutYLineList Line %1 Mouse Event Handled ").arg(i));
  12. m_pCLineGlobalOutY[i]->setPen(QPen(Qt::red));
  13. startPoint = m_pCLineGlobalOutY[i]->startPoint();
  14. endPoint = m_pCLineGlobalOutY[i]->endPoint();
  15. m_pCLineGlobalOutY[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
  16. m_pCLineGlobalOutY[i]->show();
  17. break;
  18. }
  19. else if((i<V1_DirectInputLineList.size())&& ((*it)->collidesWith(V1_DirectInputLineList.at(i))))
  20. {
  21. QMessageBox::information(this, tr("CGUITileType"),tr("V1_DirectInputLineList Line %1 Mouse Event Handled ").arg(i));
  22. m_pV1_CLineDirectInput[i]->setPen(QPen(Qt::red));
  23. startPoint = m_pV1_CLineDirectInput[i]->startPoint();
  24. endPoint = m_pV1_CLineDirectInput[i]->endPoint();
  25. m_pV1_CLineDirectInput[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
  26. m_pV1_CLineDirectInput[i]->show();
  27. break;
  28. }
To copy to clipboard, switch view to plain text mode 

Now the problem is no matter which canvas item i click, it enters the first 'if' and highlights the 0th item...

Kapil