Kapil
20th April 2006, 12:47
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..
void CGUITileType::displayRLC(int numRLC)
{
m_pCRectRLC = new Q3CanvasRectangle(xPoint,yPoint,width,height,m_pCa nvas);
m_pCRectRLC->show();
RLCRecList.append(m_pCRectRLC);
m_pCLineRLCHorizontal = new Q3CanvasLine*[8];
m_pCLineConnectHrzRLC = new Q3CanvasLine*[8];
for(i=0;i<8;i++)
{
m_pCLineRLCHorizontal[i] = new Q3CanvasLine(m_pCanvas);
m_pCLineRLCHorizontal[i]->setPoints(h_xxPoint,h_xyPoint,h_yxPoint,h_yyPoint) ;
m_pCLineRLCHorizontal[i]->show();
RLCHorizontalLineList.append(m_pCLineRLCHorizontal[i]);
}
m_pCLineRLCVertical = new Q3CanvasLine*[4];
for(i=0;i<4;i++)
{
m_pCLineRLCVertical[i] = new Q3CanvasLine(m_pCanvas);
m_pCLineRLCVertical[i]->setPoints(v_xxPoint[i],v_xyPoint,v_yxPoint,v_yyPoint);
m_pCLineRLCVertical[i]->show();
RLCVerticalLineList.append(m_pCLineRLCVertical[i]);
}
}
and the .h (header file) is
class CGUITileType : public Q3CanvasView
{
private:
QList<Q3CanvasItem *> RLCHorizontalLineList;
QList<Q3CanvasItem *> RLCVerticalLineList;
};
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
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..
void CGUITileType::displayRLC(int numRLC)
{
m_pCRectRLC = new Q3CanvasRectangle(xPoint,yPoint,width,height,m_pCa nvas);
m_pCRectRLC->show();
RLCRecList.append(m_pCRectRLC);
m_pCLineRLCHorizontal = new Q3CanvasLine*[8];
m_pCLineConnectHrzRLC = new Q3CanvasLine*[8];
for(i=0;i<8;i++)
{
m_pCLineRLCHorizontal[i] = new Q3CanvasLine(m_pCanvas);
m_pCLineRLCHorizontal[i]->setPoints(h_xxPoint,h_xyPoint,h_yxPoint,h_yyPoint) ;
m_pCLineRLCHorizontal[i]->show();
RLCHorizontalLineList.append(m_pCLineRLCHorizontal[i]);
}
m_pCLineRLCVertical = new Q3CanvasLine*[4];
for(i=0;i<4;i++)
{
m_pCLineRLCVertical[i] = new Q3CanvasLine(m_pCanvas);
m_pCLineRLCVertical[i]->setPoints(v_xxPoint[i],v_xyPoint,v_yxPoint,v_yyPoint);
m_pCLineRLCVertical[i]->show();
RLCVerticalLineList.append(m_pCLineRLCVertical[i]);
}
}
and the .h (header file) is
class CGUITileType : public Q3CanvasView
{
private:
QList<Q3CanvasItem *> RLCHorizontalLineList;
QList<Q3CanvasItem *> RLCVerticalLineList;
};
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