Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def splashScreen(self):
- img = QLabel(self.w)
- img.setGeometry(0,0,640,480)
- pixmap = QPixmap('background.png')
- img.setPixmap(pixmap.scaled(640,480,Qt.KeepAspectRatio))
- QTimer.singleShot(2000, img.hide)
- def mainScreen(self):
- btn=QPushButton(self.w)
- btn.setText('Click')
- btn.move(270,228)
- btn.setCursor(QCursor(Qt.PointingHandCursor))
- def run(self):
- self.mainScreen() # --> paint the button
- self.splashScreen() # --> paint the img on top layer
- self.w.show() # --> display the widget
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement