Hi, if You still dwell on that or someone else is looking for information on this problem. Probably, Your application crashes, because You use delete operator on the QFtp instance. In this case, if there was something posted, sent to this object, or signal invoked, there is possibility, it will crash. Instead, try using QObject::deleteLater(), which causes that instance is deleted just at the end of the QEventLoop.
It worked in my case. I worked with ftp server that run on the machine which could get disconnected and, what is worse, restared after being disconnected. Thus, I still had connection opened, and couldn't work on the QFtp instance any more. The timeout signal (see class FtpWatcher in this thread, hopefully correct one) was connected to the slot, which invoked:
Qt Code:
ftp->abort(); ftp->close(); ftp->deleteLater();To copy to clipboard, switch view to plain text mode
Probably it wasn't necessary to call first two functions, but I tried to be safe (If by miracle connection got back - but probably then, I wouldn't manage to wait for it to be closed before destruction). Hopefully it helps somenone.
All the best,
Chris.
Bookmarks