user446836
user446836

Reputation: 733

How to unset a Qt attribute

I am setting an attribute using setAttribute( Qt::WA_OpaquePaintEvent ); Is there a way I can unset this attribute? Or is there a default attribute that I need to set to get it back to the way it was? Thanks.

Upvotes: 0

Views: 3181

Answers (1)

ismail
ismail

Reputation: 47642

Just use the second parameter,

setAttribute(Qt::WA_OpaquePaintEvent , false)

See http://doc.qt.io/qt-5/qwidget.html#setAttribute

Upvotes: 6

Related Questions