Skip to content

Instantly share code, notes, and snippets.

@nikolak
Created May 3, 2014 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikolak/705dc0fb6e2766379157 to your computer and use it in GitHub Desktop.
Save nikolak/705dc0fb6e2766379157 to your computer and use it in GitHub Desktop.
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