2
# -*- coding: utf-8 -*-
3
__author__ = 'Shine Huang'
7
from PyQt4.QtGui import *
8
from PyQt4.QtCore import *
9
class AAA(QMainWindow):
10
def __init__(self,parent=None):
11
QMainWindow.__init__(self,parent)
14
self.bbb = QPushButton(self)
15
self.bbb.setGeometry(50,50,70,25)
16
self.bbb.clicked.connect(self.ccc)
19
os.execv("/usr/bin/python", ["foo", "/home/shine/PycharmProjects/ubuntu-kylin-software-center/test/restarttext.py"])
22
app = QApplication(sys.argv)
24
QTextCodec.setCodecForTr(QTextCodec.codecForName("UTF-8"))
25
QTextCodec.setCodecForCStrings(QTextCodec.codecForName("UTF-8"))
28
windowWidth = QApplication.desktop().width()
29
windowHeight = QApplication.desktop().height()
30
mw.move((windowWidth - mw.width()) / 2, (windowHeight - mw.height()) / 2)
36
if __name__ == '__main__':
b'\\ No newline at end of file'