PDA

View Full Version : incomplete type ? (error)



noborder
3rd February 2013, 15:57
I have slot:

void Image::imagechange(QStringList filelist) // error: 'filelist' has incomplete type.
{
qDebug() << "imagechange";
QString imagepath;;
emit signal_show_image(imagepath);
}

header:

public slots:
void imagechange(QStringList filelist);

Signal emit from:

connect (myunzip,SIGNAL(signal_show_image(QStringList)),th is,SLOT(unzipdone(QStringList)));
connect (this,SIGNAL(signal_unzip_done(QStringList)),image ,SLOT(imagechange(QStringList)));


void ComicView::unzipdone(QStringList filelist)
{
emit signal_unzip_done(filelist);
}

myunzip:

.........
QStringList filelist, numberlist, dirpath;
// QString dirpath;
if( !list.isEmpty() )
{
int num_total = list.count();

for (int i = 0; i < num_total; ++i)
{
const UnZip::ZipEntry& entry = list.at(i);

if( entry.type != UnZip::Directory)
{
numberlist << "picture"+QString::number(i);
}
else
{
filelist << entry.filename;
}
}
}

qDebug() << filelist;
emit signal_show_image(filelist);

Lesiok
3rd February 2013, 16:00
You must put somewhere this line
#include <QStringList>