Created
May 3, 2014 09:50
-
-
Save nikolak/705dc0fb6e2766379157 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from PySide import QtGui, QtCore | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self): | |
super(MainWindow, self).__init__() | |
self.showFullScreen() | |
self.setWindowTitle('TimeBot') | |
self.quit_widget = QuitBtn(self) | |
self.setCentralWidget(self.quit_widget) | |
class QuitBtn(QtGui.QWidget): | |
def __init__(self, parent): | |
super(QuitBtn, self).__init__(parent) | |
self.layout = QtGui.QVBoxLayout(self) | |
self.btn = QtGui.QPushButton('Quit', self) | |
self.btn.clicked.connect(QtCore.QCoreApplication.quit) | |
self.layout.addWidget(self.btn) | |
def main(): | |
app = QtGui.QApplication(sys.argv) | |
window=MainWindow() | |
app.exec_() | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment