Hi...

I have created a set of Canvas Items and am trying to append them to a QList.. But they are not being appended and the size returned is 0..
Here is the code for the .cpp and the .h file.. Please help me what can be the reason for it..
Qt Code:
  1. void CGUITileType::displayRLC(int numRLC)
  2. {
  3. m_pCRectRLC = new Q3CanvasRectangle(xPoint,yPoint,width,height,m_pCanvas);
  4. m_pCRectRLC->show();
  5.  
  6. RLCRecList.append(m_pCRectRLC);
  7.  
  8. m_pCLineRLCHorizontal = new Q3CanvasLine*[8];
  9. m_pCLineConnectHrzRLC = new Q3CanvasLine*[8];
  10.  
  11. for(i=0;i<8;i++)
  12. {
  13. m_pCLineRLCHorizontal[i] = new Q3CanvasLine(m_pCanvas);
  14. m_pCLineRLCHorizontal[i]->setPoints(h_xxPoint,h_xyPoint,h_yxPoint,h_yyPoint);
  15. m_pCLineRLCHorizontal[i]->show();
  16.  
  17. RLCHorizontalLineList.append(m_pCLineRLCHorizontal[i]);
  18. }
  19.  
  20.  
  21. m_pCLineRLCVertical = new Q3CanvasLine*[4];
  22.  
  23. for(i=0;i<4;i++)
  24. {
  25. m_pCLineRLCVertical[i] = new Q3CanvasLine(m_pCanvas);
  26. m_pCLineRLCVertical[i]->setPoints(v_xxPoint[i],v_xyPoint,v_yxPoint,v_yyPoint);
  27. m_pCLineRLCVertical[i]->show();
  28.  
  29. RLCVerticalLineList.append(m_pCLineRLCVertical[i]);
  30.  
  31. }
  32.  
  33. }
To copy to clipboard, switch view to plain text mode 

and the .h (header file) is
Qt Code:
  1. class CGUITileType : public Q3CanvasView
  2. {
  3. private:
  4. QList<Q3CanvasItem *> RLCHorizontalLineList;
  5. QList<Q3CanvasItem *> RLCVerticalLineList;
  6.  
  7. };
To copy to clipboard, switch view to plain text mode 

I have not put in the entire .cpp and the header file as it is very huge in size... i have put in the important declaration and use of the QList variables...

Thank you...

with regards,
Kapil