TMyTab::TMyTab(QWidget *parent) : QTabWidget(parent){ setTabPosition (QTabWidget::East); setUsesScrollButtons (false); setIconSize (QSize (50, 50)); QFont font("Times", 40, QFont::Bold); setFont(font); QPixmap pixmap (50, 50); QPainter painter; for (int i = 0; i < 4; ++i) { pixmap.fill (Qt::transparent); painter.begin (&pixmap); painter.setPen (Qt::black); painter.setFont (QFont ("Times", 14, QFont::Normal)); painter.rotate (-90); painter.translate (-50, 5); painter.drawText (pixmap.rect(), Qt::AlignCenter, "TAB_" + QString::number (i)); painter.end(); QLabel * pLabel = new QLabel (" Page_" + QString::number (i)); pLabel->setFont (QFont("Times", 14, QFont::Bold)); addTab (pLabel, QIcon (pixmap), ""); }}