code: def generateResourceFile(srcpath, outpath='', buildpath='', build=True):
      
      if not outpath:
          outpath = os.path.join(os.path.dirname(srcpath), 
                                 os.path.basename(srcpath) + '.qrc')
          relpath = './%s' % os.path.basename(srcpath)
      else:
          relpath = os.path.relpath(srcpath, os.path.dirname(outpath))
      
      xml = ElementTree.Element('RCC')
      xml.set('header', 'projexui.resources')
      
      srcpath = nativestring(srcpath)
      srcpath = os.path.normpath(srcpath)
      root_prefix = os.path.basename(srcpath) + '/'
      count = len(srcpath)
      
      for root, folders, files in os.walk(srcpath):
          if not files:
              continue
          
          relpath = os.path.relpath(root, os.path.dirname(outpath))
          prefix = (root_prefix + root[count+1:].replace('\\', '/')).strip('/')
          
          xresource = ElementTree.SubElement(xml, 'qresource')
          xresource.set('prefix', prefix)
          
          for file in files:
              xfile = ElementTree.SubElement(xresource, 'file')
              xfile.set('alias', file)
              xfile.text = os.path.join(relpath, file).replace('\\', '/')
      
      projex.text.xmlindent(xml)
      xml_str = ElementTree.tostring(xml)
      
      # save the exported information
      with open(outpath, 'w') as f:
          f.write(xml_str)
  
      if build:
          buildResourceFile(outpath, buildpath)
docs: Generates a Qt resource file based on the given source path.  This will
      take all the files and folders within the source and generate a new XML
      representation of that path.  An optional outpath can be provided as the
      generated resource path, by default it will be called the name of the
      source path.
      
      :param      srcpath | <str>
                  outpath | <str>