I have slot:
void Image
::imagechange(QStringList filelist
) // error: 'filelist' has incomplete type. {
qDebug() << "imagechange";
emit signal_show_image(imagepath);
}
void Image::imagechange(QStringList filelist) // error: 'filelist' has incomplete type.
{
qDebug() << "imagechange";
QString imagepath;;
emit signal_show_image(imagepath);
}
To copy to clipboard, switch view to plain text mode
header:
public slots:
public slots:
void imagechange(QStringList filelist);
To copy to clipboard, switch view to plain text mode
Signal emit from:
{
emit signal_unzip_done(filelist);
}
connect (myunzip,SIGNAL(signal_show_image(QStringList)),this,SLOT(unzipdone(QStringList)));
connect (this,SIGNAL(signal_unzip_done(QStringList)),image,SLOT(imagechange(QStringList)));
void ComicView::unzipdone(QStringList filelist)
{
emit signal_unzip_done(filelist);
}
To copy to clipboard, switch view to plain text mode
myunzip:
.........
// 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);
.........
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);
To copy to clipboard, switch view to plain text mode
Bookmarks