code: def set_widgets(self):
          
          self.clear_further_steps()
          # Set widgets
          purpose = self.parent.step_kw_purpose.selected_purpose()
          self.lstSubcategories.clear()
          self.lblDescribeSubcategory.setText('')
          self.lblIconSubcategory.setPixmap(QPixmap())
          self.lblSelectSubcategory.setText(
              get_question_text('%s_question' % purpose['key']))
          for i in self.subcategories_for_layer():
              # noinspection PyTypeChecker
              item = QListWidgetItem(i['name'], self.lstSubcategories)
              # noinspection PyTypeChecker
              item.setData(QtCore.Qt.UserRole, i['key'])
              self.lstSubcategories.addItem(item)
  
          # Check if layer keywords are already assigned
          key = self.parent.step_kw_purpose.selected_purpose()['key']
          keyword = self.parent.get_existing_keyword(key)
  
          # Overwrite the keyword if it's KW mode embedded in IFCW mode
          if self.parent.parent_step:
              keyword = self.parent.get_parent_mode_constraints()[1]['key']
  
          # Set values based on existing keywords or parent mode
          if keyword:
              subcategories = []
              for index in range(self.lstSubcategories.count()):
                  item = self.lstSubcategories.item(index)
                  subcategories.append(item.data(QtCore.Qt.UserRole))
              if keyword in subcategories:
                  self.lstSubcategories.setCurrentRow(
                      subcategories.index(keyword))
  
          self.auto_select_one_item(self.lstSubcategories)
docs: Set widgets on the Subcategory tab.