def METHOD_NAME(self, event):
    painter = QStylePainter(self)
    opt = QStyleOptionTab()
    for i in range(self.count()):
        self.initStyleOption(opt, i)
        painter.drawControl(QStyle.CE_TabBarTabShape, opt)
        painter.save()
        s = opt.rect.size()
        s.transpose()
        r = QRect(QPoint(), s)
        r.moveCenter(opt.rect.center())
        opt.rect = r
        c = self.tabRect(i).center()
        painter.translate(c)
        painter.rotate(90)
        painter.translate(-c)
        painter.drawControl(QStyle.CE_TabBarTabLabel, opt)
        painter.restore()