Skip to content

Instantly share code, notes, and snippets.

@huseyin
Last active August 29, 2015 14:17
Show Gist options
  • Save huseyin/48d667ae845de8e33c55 to your computer and use it in GitHub Desktop.
Save huseyin/48d667ae845de8e33c55 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8
#
# single thread bir programcık.
#
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from time import sleep
import sys
class MainWindow(QWidget):
def __init__(self):
super(MainWindow, self).__init__()
self.setWindowTitle("App One")
self.button = QPushButton(u"Buradan çıkabilirsin !", self)
QObject.connect(self.button, SIGNAL("clicked()"), self.on_clicked)
self.showFullScreen()
self.show()
def on_clicked(self):
# program tıktan 3 saniye sonra kapanabilir örneğin ..
sleep(3)
sys.exit(0)
application = QApplication(sys.argv)
window = MainWindow()
application.exec_()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment