[Mac] Drawing QTabBar without actual object crashes on Mac

[ci skip]
remotes/origin/falkon
David Rosca 12 years ago
parent b4a5754a40
commit 97d32a1191
  1. 2
      src/lib/tabwidget/combotabbar.cpp

@ -636,6 +636,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev)
{
QWidget::paintEvent(ev);
#ifndef Q_OS_MAC
// Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar
QPainter p(this);
QStyleOptionTabBarBaseV2 opt;
@ -664,6 +665,7 @@ void ComboTabBar::paintEvent(QPaintEvent* ev)
opt.rect.setWidth(scrollButtonWidth);
style()->drawPrimitive(QStyle::PE_FrameTabBarBase, &opt, &p);
}
#endif
}
int ComboTabBar::comboTabBarPixelMetric(ComboTabBar::SizeType sizeType) const

Loading…
Cancel
Save