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 _prepareNesting(self):
      # extract all child widgets and place into a new layout that we can add to
      if self._nestingReady is False:
          # top layout contains progress bars + cancel button at the bottom
          self._topLayout = QtWidgets.QGridLayout()
          self.setLayout(self._topLayout)
          self._topLayout.setContentsMargins(0, 0, 0, 0)
  
          # A vbox to contain all progress bars
          self.nestedVBox = QtWidgets.QWidget()
          self._topLayout.addWidget(self.nestedVBox, 0, 0, 1, 2)
          self.nestedLayout = QtWidgets.QVBoxLayout()
          self.nestedVBox.setLayout(self.nestedLayout)
  
          # re-insert all widgets
          bar, btn = self._extractWidgets()
          self.nestedLayout.addWidget(bar)
          self._subBars.append(bar)
          self._topLayout.addWidget(btn, 1, 1, 1, 1)
          self._topLayout.setColumnStretch(0, 100)
          self._topLayout.setColumnStretch(1, 1)
          self._topLayout.setRowStretch(0, 100)
          self._topLayout.setRowStretch(1, 1)
  
          self._nestingReady = True
  
imports: from time import perf_counter
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 7 for calling the ProgressDialog obj's underlying member method code with example usage: obj._prepareNesting() without return types