标签:blog http io ar color sp on 2014 log
from PyQt4.Qt import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys
def main():
a=QApplication(sys.argv)
l=QLabel()
data=QDate.currentDate()
yaer=QDate(2015,02,18)
shui=data.daysTo(yaer)
shu=QString.number(shui)
string=QString(u‘离过年还有<font color="red";><b>‘)
tian=QString(u‘</b></font>天‘)
string=string+shu+tian
l.setText(string)
l.setWindowTitle(u‘倒计时‘)
font=QFont()
font.setPointSize(30)
l.setFont(font)
l.resize(300,43)
l.show()
a.exec_()
main()
如图:
标签:blog http io ar color sp on 2014 log
原文地址:http://www.cnblogs.com/mhxy13867806343/p/4136301.html