Reputation: 2722
I'm trying to show a widget on top of another and apply the QGraphicsBlurEffect
only on the parent like this
MyWidget::MyWidget(QWidget* parent) :
QWidget(parent),
{
QGraphicsBlurEffect* effect = new QGraphicsBlurEffect(this);
parent->setGraphicsEffect(effect);
}
But the result is both widget are blur.
It seams like the effect is propagated to the childrens.
How can I apply the blur effect on the parent only?
Upvotes: 1
Views: 1243
Reputation: 5336
Your best option would be to break the parent-child relationship. There's no flags like QGraphicsItem
's ItemIgnoresParentOpacity
for QGraphicsEffects
.
Another solution would be to copy the ItemIgnoresParentOpacity mechanism and implement it for QGraphicsEffect, but I don't think it's worth the trouble.
Upvotes: 1