'Update the tab buttons position style flags.'

def __updatePositions(self):

    if (self.count() == 0):
        return
    elif (self.count() == 1):
        self.__pages[0].button.position = QStyleOptionToolBox.OnlyOneTab
    else:
        self.__pages[0].button.position = QStyleOptionToolBox.Beginning
        self.__pages[(-1)].button.position = QStyleOptionToolBox.End
        for p in self.__pages[1:(-1)]:
            p.button.position = QStyleOptionToolBox.Middle
    for p in self.__pages:
        p.button.update()
