so i have a class that is used to upload and download files from an ftp server.
The class inherits QThread, so i initialize my ftp class in my constructor, then when i try to do a save/download i first do this
sftp.
start(QThread::NormalPriority);
sftp.get(filename);
sftp.terminate();
sftp.start(QThread::NormalPriority);
sftp.get(filename);
sftp.terminate();
To copy to clipboard, switch view to plain text mode
that doesnt seem to work, my program locks up when i download the file, and of course, once i get the file, the program resumes.
I then tried to initialize the ftp class in my constructor then immediately after initializing i call a
sftp.
start(QThread::NormalPriority);
sftp.start(QThread::NormalPriority);
To copy to clipboard, switch view to plain text mode
i call my gets/sends then at the de-constructor of the class i call
sftp.terminate();
sftp.terminate();
To copy to clipboard, switch view to plain text mode
i saw the same behavior. anyone have any suggestions?
Bookmarks