Fusion Style: Use qobject_cast rather than dynamic_cast
We want to avoid RTTI. Fixes: QTBUG-82287 Change-Id: Ib034094d4035d6dfa99d00ac198c93cc9572755b Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
b4b8ffb233
commit
94c564a082
|
|
@ -479,7 +479,7 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
|
|||
{
|
||||
QPixmap pixmap(QLatin1String(":/qt-project.org/styles/commonstyle/images/fusion_groupbox.png"));
|
||||
int topMargin = 0;
|
||||
auto control = dynamic_cast<const QGroupBox *>(widget);
|
||||
auto control = qobject_cast<const QGroupBox *>(widget);
|
||||
if (control && !control->isCheckable() && control->title().isEmpty()) {
|
||||
// Shrinking the topMargin if Not checkable AND title is empty
|
||||
topMargin = groupBoxTopMargin;
|
||||
|
|
|
|||
Loading…
Reference in New Issue