You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: progress indicator and cancel button for long operations #161
This Feature request comes along issues #114 and #107.
It would be nice if there would be a progress indicator when opening big databases or exporting big tables. Cancel button also will be welcome. Currently application freezes and becomes unresponsive until the operation ends. And you keep wondering if it's frozen for good or it's still alive and doing something.
A pop up, Justin? There are people who hate them, even block them. Better is IMNSHO a menu item called Staus or Progress with lines for all (sub)processes that take longer than let's say two or three minutes.
Collecting the info to use with it is likely harder. For (say) a CSV import it would probably be something like:
Do an initial row count for the input file. This is so we can know how far we've progressed through the total file, during the import.
Figure out how often to update the progress bar
Maybe figure out how wide the progress bar is in pixels (if there's a way). Divide total rows / # pixels
If figuring out the # of pixels for the progress bar isn't easy, then go with a percentage approach instead. eg Divide total row / 100
Now run a loop to import the CSV data, updating the progress bar every x lines (as worked out in previous step), and checking for a press of the Cancel button
That's without error handling though, and I have no solid idea on the correct behaviour if the user hits the Cancel button (eg doesn't want to wait further). Keep the data successfully imported so far?
I can confirm that the Import CSV dialog has a progress dialog with a cancel button. But unfortunately I pressed Cancel, the progress dialog closed, but the Import dialog is left frozen. I had to kill the application.
Closing this because (I believe) we have working cancel buttons for all long operations and progress dialogs for most of them. Just tested cancelling the import CSV dialog and it did work too 😄 If I'm missing anything, just re-open this issue 😄
Activity
justinclift commentedon Mar 14, 2015
Thinking about this, I suspect the right way to present it would be a pop up dialog showing progress.
Something like this:
AndrewSav commentedon Mar 16, 2015
Looks good to me.
Z4us commentedon Mar 16, 2015
A pop up, Justin? There are people who hate them, even block them. Better is IMNSHO a menu item called Staus or Progress with lines for all (sub)processes that take longer than let's say two or three minutes.
justinclift commentedon Mar 16, 2015
@Z4us Ahhh, hadn't thought of that as it's not a browser. But yeah, point taken. 😄
So, maybe a status bar thing instead then...?
Z4us commentedon Mar 16, 2015
Right, some kewl animation if technically not too hard to develop :)
justinclift commentedon Mar 16, 2015
Qt provides a "progress bar" widget already, so that's probably the thing to use for the display.
Collecting the info to use with it is likely harder. For (say) a CSV import it would probably be something like:
That's without error handling though, and I have no solid idea on the correct behaviour if the user hits the Cancel button (eg doesn't want to wait further). Keep the data successfully imported so far?
justinclift commentedon Sep 20, 2017
@MKleusberg We have progress dialogs + cancel on all our long operations now don't we?
mgrojo commentedon Oct 4, 2018
I can confirm that the Import CSV dialog has a progress dialog with a cancel button. But unfortunately I pressed Cancel, the progress dialog closed, but the Import dialog is left frozen. I had to kill the application.
MKleusberg commentedon Feb 13, 2020
Closing this because (I believe) we have working cancel buttons for all long operations and progress dialogs for most of them. Just tested cancelling the import CSV dialog and it did work too 😄 If I'm missing anything, just re-open this issue 😄