Last active
August 29, 2015 14:17
-
-
Save huseyin/48d667ae845de8e33c55 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
# -*- 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