zerokewl
7th September 2013, 10:34
Hello,
I am uploading/downloading BLOB files into a MySQL Database and it works well with small files. However BLOB sizes in MySQL can go upwards to 2GB per entry in a database, and i want to allow my application to upload up to that limit. At the moment when i upload a small file, using a QSqlQuery.bindValue and QSqlQuery.prepare, it works. But when i try to upload a larger file, it hangs until its done.
Now i can separate it so it doesn't hang using a QObject.movetoThread() and doing my work in that thread, but what I'm really looking for is a way to bind a signal/slot from the QSqlQuery.exec() to a ProgressDialog.setValue() .
Do i have to subclass a QSqlQuery and rewrite something there, or is there another way?
I want to show the user, something is either being uploaded, or downloaded with a progress bar, and also put a cancel button there if they want to stop it.
I know if this was a QIODevice, i could use bytesWritten for such progress display, is there anything similar for QSqlQuery and Exec?
Thank you.
I am uploading/downloading BLOB files into a MySQL Database and it works well with small files. However BLOB sizes in MySQL can go upwards to 2GB per entry in a database, and i want to allow my application to upload up to that limit. At the moment when i upload a small file, using a QSqlQuery.bindValue and QSqlQuery.prepare, it works. But when i try to upload a larger file, it hangs until its done.
Now i can separate it so it doesn't hang using a QObject.movetoThread() and doing my work in that thread, but what I'm really looking for is a way to bind a signal/slot from the QSqlQuery.exec() to a ProgressDialog.setValue() .
Do i have to subclass a QSqlQuery and rewrite something there, or is there another way?
I want to show the user, something is either being uploaded, or downloaded with a progress bar, and also put a cancel button there if they want to stop it.
I know if this was a QIODevice, i could use bytesWritten for such progress display, is there anything similar for QSqlQuery and Exec?
Thank you.