Creates a new header menu to be displayed.
        
        :return     <QtGui.QMenu>

def createHeaderMenu(self, index):
        """
        Creates a new header menu to be displayed.
        
        :return     <QtGui.QMenu>
        """
        menu = QtGui.QMenu(self)
        act = menu.addAction("Hide '%s'" % self.columnOf(index))
        act.triggered.connect( self.headerHideColumn )
        
        menu.addSeparator()
        
        act = menu.addAction('Sort Ascending')
        act.setIcon(QtGui.QIcon(resources.find('img/sort_ascending.png')))
        act.triggered.connect( self.headerSortAscending )
        
        act = menu.addAction('Sort Descending')
        act.setIcon(QtGui.QIcon(resources.find('img/sort_descending.png')))
        act.triggered.connect( self.headerSortDescending )
        
        act = menu.addAction('Resize to Contents')
        act.setIcon(QtGui.QIcon(resources.find('img/treeview/fit.png')))
        act.triggered.connect( self.resizeToContents )
        
        menu.addSeparator()
        
        colmenu = menu.addMenu( 'Show/Hide Columns' )
        colmenu.setIcon(QtGui.QIcon(resources.find('img/columns.png')))
        colmenu.addAction('Show All')
        colmenu.addAction('Hide All')
        colmenu.addSeparator()
        
        hitem = self.headerItem()
        columns = self.columns()
        for column in sorted(columns):
            col    = self.column(column)
            action = colmenu.addAction(column)
            action.setCheckable(True)
            action.setChecked(not self.isColumnHidden(col))
        
        colmenu.triggered.connect( self.toggleColumnByAction )
        
        menu.addSeparator()
        exporters = self.exporters()
        if exporters:
            submenu = menu.addMenu('Export as')
            submenu.setIcon(QtGui.QIcon(resources.find('img/export.png')))
            for exporter in exporters:
                act = submenu.addAction(exporter.name())
                act.setData(wrapVariant(exporter.filetype()))
            submenu.triggered.connect(self.exportAs)
        
        return menu