from PyQt4 import QtCore,QtGui
import sys
""" docstring for WindLauncher
"""
def __init__(self):
super(WindLauncher, self).__init__()
self.btn.clicked.connect(self.launchWin)
self.setCentralWidget(self.btn)
def launchWin(self):
main = MyTableView()
animation = QtCore.QPropertyAnimation(main, "geometry")
animation.setDuration(500);
animation.
setStartValue(QtCore.
QRect(0,
-(sh
), sw, sh
));
animation.
setEndValue(QtCore.
QRect(0,
0, sw, sh
));
animation.start();
self.show()
self.raise_()
"""docstring for MyTableView"""
def __init__(self, parent=None):
super(MyTableView, self).__init__(parent)
if __name__ == "__main__":
main = WindLauncher()
main.show()
main.raise_()
sys.exit(application.exec_())
from PyQt4 import QtCore,QtGui
import sys
class WindLauncher(QtGui.QMainWindow):
""" docstring for WindLauncher
"""
def __init__(self):
super(WindLauncher, self).__init__()
self.btn = QtGui.QPushButton("Launch")
self.btn.clicked.connect(self.launchWin)
self.setCentralWidget(self.btn)
def launchWin(self):
main = MyTableView()
sw = QtGui.QDesktopWidget().screenGeometry(main).width()
sh = QtGui.QDesktopWidget().screenGeometry(main).height()
animation = QtCore.QPropertyAnimation(main, "geometry")
animation.setDuration(500);
animation.setStartValue(QtCore.QRect(0, -(sh), sw, sh));
animation.setEndValue(QtCore.QRect(0, 0, sw, sh));
animation.start();
self.show()
self.raise_()
class MyTableView(QtGui.QTableView):
"""docstring for MyTableView"""
def __init__(self, parent=None):
super(MyTableView, self).__init__(parent)
if __name__ == "__main__":
application = QtGui.QApplication(sys.argv)
main = WindLauncher()
main.show()
main.raise_()
sys.exit(application.exec_())
To copy to clipboard, switch view to plain text mode
Bookmarks