python - PyQt: QProgressDialog shows but is empty (displays background content) -
I have a piece of code that I've used elsewhere (where is it exactly what I want), But in this case does not. Actually my function body calculates a count of things, the results bring in a penus dataframe and a platus plot into a matplot canvas.
I placed the code below at the top of my function body, hoping that this display function is a dialog box for the duration of the call. However, whatever happens, the dialog box appears, which contains the box contents that appear on the screen, which is immediately behind the screen. The function is made on the screen for the duration of the call and then it stops at the end.
What is wrong with anybody?
If this is useful, then the parent ( Oh, and one more thing, if I remove Thanks a lot for your help! Progress = QProgressDialog (parent = self) progress.SetCatalButton (none) progress. Cetallable text ('Updating ...') progress. Minimum (0) progress. SetMaximum (0) progress.forceShow () #calculate and plot DataFrame progress.cancel () Again, it is easy to type your calculation function normally with the decorator: / P> and then it's normal R Run in: self) is a
QWidget .
progress.cancel () after performing the main part of the function, then
QProgressDialog actually Paint yourself with progress bar and label text ('updating ...').
@nongui def Task (Input): # Here you calculate the output and returns the # progress dialog value to
outside = action (input)
Comments
Post a Comment