code: def _createSpinBoxes(self, row):
          
          assert len(self._spinBoxes) == 0, "Spinbox list not empty. Call _deleteSpinBoxes first"
  
          if not self.rtiIsSliceable:
              return
  
          logger.debug("_createSpinBoxes, array shape: {}".format(self._rti.arrayShape))
  
          self._setColumnCountForContents()
  
          tree = self.tree
          model = self.tree.model()
          col = self.COL_FIRST_COMBO + self.maxCombos
  
          for dimNr, dimSize in enumerate(self._rti.arrayShape):
  
              if self._dimensionSelectedInComboBox(dimNr):
                  continue
  
              self._setHeaderLabel(col, '')
  
              spinBox = CollectorSpinBox()
              self._spinBoxes.append(spinBox)
  
              spinBox.setKeyboardTracking(False)
              spinBox.setCorrectionMode(QtWidgets.QAbstractSpinBox.CorrectToNearestValue)
  
              spinBox.setMinimum(0)
              spinBox.setMaximum(dimSize - 1)
              spinBox.setSingleStep(1)
              spinBox.setValue(dimSize // 2) # select the middle of the slice
              spinBox.setPrefix("{}: ".format(self._rti.dimensionNames[dimNr]))
              spinBox.setSuffix("/{}".format(spinBox.maximum()))
              spinBox.setProperty("dim_nr", dimNr)
              #spinBox.adjustSize() # necessary?
  
              # This must be done after setValue to prevent emitting too many signals
              spinBox.valueChanged[int].connect(self._spinboxValueChanged)
  
              tree.setIndexWidget(model.index(row, col), spinBox)
              col += 1
  
          # Resize the spinbox columns to their new contents
          self.tree.resizeColumnsToContents(startCol=self.COL_FIRST_COMBO + self.maxCombos)
docs: Creates a spinBox for each dimension that is not selected in a combo box.