My example:
void funcMain()
{
connect(ftp,
SIGNAL(listInfo
(QUrlInfo)),
.....
ftp->list(); // emit signal listInfo();
.....
return;
}
{
//do something
}
void funcMain()
{
QFtp * ftp = new QFtp(this);
connect(ftp, SIGNAL(listInfo(QUrlInfo)),
this, SLOT(addToList(QUrlInfo)));
.....
ftp->list(); // emit signal listInfo();
.....
return;
}
void addToList(QUrlInfo info)
{
//do something
}
To copy to clipboard, switch view to plain text mode
When debug, SLOT(addToList) is invoked after funcMain() return. But i want addToList() to be invoked right after statement ftp->list() finish and before funcMain return , so what should i do ? And signal listInfo() is emitted while invoking ftp->list() or after ftp->list() finish or after funcMain() return ?
Bookmarks