from PyQt4 import QtCore,QtGui
from functools import partial
import sys
"""docstring for MyTableView"""
def __init__(self, parent=None):
super(MyTableView, self).__init__(parent)
self.showFullScreen()
self.
setGeometry(QtCore.
QRect(0,
-(sh
), sw, sh
))
""" docstring for WindLauncher
"""
def __init__(self):
super(WindLauncher, self).__init__()
callLaunch = partial(self.launchWin, sw, sh)
self.btn.clicked.connect(callLaunch)
self.setCentralWidget(self.btn)
def launchWin(self, sw, sh):
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();
main.show()
main.raise_()
if __name__ == "__main__":
main = WindLauncher()
main.show()
main.raise_()
sys.exit(application.exec_())
from PyQt4 import QtCore,QtGui
from functools import partial
import sys
class MyTableView(QtGui.QTableView):
"""docstring for MyTableView"""
def __init__(self, parent=None):
super(MyTableView, self).__init__(parent)
self.showFullScreen()
sw = QtGui.QDesktopWidget().screenGeometry(self).width()
sh = QtGui.QDesktopWidget().screenGeometry(self).height()
self.setGeometry(QtCore.QRect(0, -(sh), sw, sh))
class WindLauncher(QtGui.QMainWindow):
""" docstring for WindLauncher
"""
def __init__(self):
super(WindLauncher, self).__init__()
self.btn = QtGui.QPushButton("Launch")
sw = QtGui.QDesktopWidget().screenGeometry(self).width()
sh = QtGui.QDesktopWidget().screenGeometry(self).height()
callLaunch = partial(self.launchWin, sw, sh)
self.btn.clicked.connect(callLaunch)
self.setCentralWidget(self.btn)
def launchWin(self, sw, sh):
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();
main.show()
main.raise_()
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