sabeesh
3rd October 2007, 07:40
Hi,
I have a class named as CVideoFrame and I create two constructor like this,
CVideoFrame::CVideoFrame(uint number, const QImage *rgb, const QImage *y, const QImage *u, const QImage *v)
{
qDebug("Enter 1st constructor");
}
and
CVideoFrame::CVideoFrame(const CVideoFrame &f)
{
qDebug("Enter 2nd constructor");
}
and in my program I declare some variables like this,
uint i;
const QImage *rgb, *y, *u, *v;
QList<CVideoFrame> m_VideoFrames;
and CVideoFrame *frame = new CVideoFrame(i, rgb, y, u, v);
at this time the first constructor is created and the message " Enter 1st constructor " is print. But when i try this line
m_VideoFrames.append(*frame);
then the second constructor is work and the message " Enter 1st constructor " is print.
Here I try to append the value to m_VideoFrames. So why the second constructor is work.
Please help me to solve this problem
I have a class named as CVideoFrame and I create two constructor like this,
CVideoFrame::CVideoFrame(uint number, const QImage *rgb, const QImage *y, const QImage *u, const QImage *v)
{
qDebug("Enter 1st constructor");
}
and
CVideoFrame::CVideoFrame(const CVideoFrame &f)
{
qDebug("Enter 2nd constructor");
}
and in my program I declare some variables like this,
uint i;
const QImage *rgb, *y, *u, *v;
QList<CVideoFrame> m_VideoFrames;
and CVideoFrame *frame = new CVideoFrame(i, rgb, y, u, v);
at this time the first constructor is created and the message " Enter 1st constructor " is print. But when i try this line
m_VideoFrames.append(*frame);
then the second constructor is work and the message " Enter 1st constructor " is print.
Here I try to append the value to m_VideoFrames. So why the second constructor is work.
Please help me to solve this problem