Skip to content

Instantly share code, notes, and snippets.

@sanfx
Created December 7, 2013 04:39
Show Gist options
  • Select an option

  • Save sanfx/7837368 to your computer and use it in GitHub Desktop.

Select an option

Save sanfx/7837368 to your computer and use it in GitHub Desktop.
from PyQt4 import QtCore,QtGui
import sys
class AnimatedWindow(QtGui.QWidget):
"""docstring for AnimatedWindow"""
def __init__(self, parent = None):
super(AnimatedWindow, self).__init__(parent)
animation = QtCore.QPropertyAnimation(self, "windowOpacity")
animation.setDuration(1000);
animation.setStartValue(0.0);
animation.setEndValue(1.0);
animation.setEasingCurve(QtCore.QEasingCurve.OutCubic)
QtCore.QTimer.singleShot(10000, animation, QtCore.SLOT("start()"))
QtCore.QObject.connect(animation,QtCore.SIGNAL("finished()"),animation, QtCore.SLOT("deleteLater()"))
if __name__ == "__main__":
application = QtGui.QApplication(sys.argv)
main = AnimatedWindow()
main.show()
sys.exit(application.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment