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")
code: def _removeSubDialog(self, dlg):
      # don't remove the widget just yet; instead we hide it and leave it in
      # as a placeholder.
      bar, btn = dlg._extractWidgets()
      bar.hide()
  
imports: from time import perf_counter
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 6 for calling the ProgressDialog obj's underlying member method code with example usage: obj._removeSubDialog(dlg) without return types