'Set the model containing the actions.'

def setModel(self, model):

    root = model.invisibleRootItem()
    for i in range(root.rowCount()):
        item = root.child(i)
        index = item.index()
        page = self.createPage(index)
        page.setActionRole(QtWidgetRegistry.WIDGET_ACTION_ROLE)
        i = self.addPage(page.title(), page)
        brush = index.data(QtWidgetRegistry.BACKGROUND_ROLE)
        if isinstance(brush, QBrush):
            base_color = brush.color()
            button = self.__pages.tabButton(i)
            button.setStyleSheet((TAB_BUTTON_STYLE_TEMPLATE % (create_css_gradient(base_color), create_css_gradient(base_color.darker(120)))))
    self.__model = model
    self.__suggestPage.setModel(model)
