class_docstr: Extends QProgressDialog:
  
    * Adds context management so the dialog may be used in `with` statements
    * Allows nesting multiple progress dialogs
  
  Example::
  
      with ProgressDialog("Processing..", minVal, maxVal) as dlg:
          # do stuff
          dlg.setValue(i)   ## could also use dlg += 1
          if dlg.wasCanceled():
              raise Exception("Processing canceled by user")
docstr: Use inplace-addition operator for easy incrementing.
docstr_tok: ["Use","inplace-addition","operator","for","easy","incrementing","."]
code: def __iadd__(self, val):
      """Use inplace-addition operator for easy incrementing."""
      if self.disabled:
          return self
      self.setValue(self.value() + val)
      return self
  
imports: from time import perf_counter
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 4 for calling the ProgressDialog obj's underlying member method code with example usage: obj.__iadd__(val) and returns: self, self