- QPoint topLeft = rect().topRight()-QPoint(mInfoImage.width()+SPACER,-SPACER);
- QRect infoRect = QRect(topLeft, topLeft+QPoint(mInfoImage.width(),mInfoImage.height()));
+ int height = tabBar()->tabRect(currentIndex()).height();
+ QImage image = mInfoImage.scaled(QSize(height,height),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation);
+ QPoint topLeft = rect().topRight()-QPoint(image.width(),0);
+ QRect infoRect = QRect(topLeft, topLeft+QPoint(image.width(),image.height()));