I have a QGraphicsView (under QMainWindow) with a pop-up QWidget for item properties which fades in with QGraphicsOpacity effect. The problem is that when I start the animation the outer frame border of the widget fades in as expected, but the contents of the widget remains transparent until I click somewhere on the window. Seem like a Qt bug.
Thoughts?
self.effect = QGraphicsOpacityEffect(self)
self.setGraphicsEffect(self.effect)
self.opacityAnimation = QPropertyAnimation(self.effect, b'opacity')
self.opacityAnimation.setDuration(300)
self.opacityAnimation.finished.connect(self.onOpacityDone)
def show(self):
super().show()
self.opacityAnimation.setStartValue(0)
self.opacityAnimation.setEndValue(1)
self.opacityAnimation.start()
def hide(self):
self.person = None
if self.opacityAnimation.finished():
self.opacityAnimation.setStartValue(0)
self.opacityAnimation.setEndValue(1)
self.opacityAnimation.start()
else:
super().hide()
def onOpacityDone(self):
if self.opacityAnimation.currentValue() == 0:
super().hide()
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
