code: def qteSplitApplet(self, applet: (QtmacsApplet, str)=None,
                         splitHoriz: bool=True,
                         windowObj: QtmacsWindow=None):
          if isinstance(applet, str):
              newAppObj = self.qteGetAppletHandle(applet)
          else:
              newAppObj = applet
          if windowObj is None:
              windowObj = self.qteActiveWindow()
              if windowObj is None:
                  msg = 'Cannot determine the currently active window.'
                  self.qteLogger.error(msg, stack_info=True)
                  return
          if splitHoriz:
              splitOrientation = QtCore.Qt.Horizontal
          else:
              splitOrientation = QtCore.Qt.Vertical
          if newAppObj is None:
              newAppObj = self.qteNextApplet(skipVisible=True,
                                             skipInvisible=False)
          else:
              if newAppObj.qteIsVisible():
                  return False
          if newAppObj is None:
              self.qteLogger.warning('All applets are already visible.')
              return False
          if windowObj.qteAppletSplitter.count() == 0:
              windowObj.qteAppletSplitter.qteAddWidget(newAppObj)
              windowObj.qteAppletSplitter.setOrientation(splitOrientation)
              return True
          curApp = self.qteNextApplet(numSkip=0, windowObj=windowObj)
          split = self._qteFindAppletInSplitter(
              curApp, windowObj.qteAppletSplitter)
          if split is None:
              msg = 'Active applet <b>{}</b> not in the layout.'
              msg = msg.format(curApp.qteAppletID())
              self.qteLogger.error(msg, stack_info=True)
              return False
          if split is windowObj.qteAppletSplitter:
              if split.count() == 1:
                  split.qteAddWidget(newAppObj)
                  split.setOrientation(splitOrientation)
                  return True
          curAppIdx = split.indexOf(curApp)
          newSplit = QtmacsSplitter(splitOrientation, windowObj)
          curApp.setParent(None)
          newSplit.qteAddWidget(curApp)
          newSplit.qteAddWidget(newAppObj)
          split.insertWidget(curAppIdx, newSplit)
          split.qteAdjustWidgetSizes()
          return True