Python 图形界面哪个好
答案:2 悬赏:20
解决时间 2021-02-12 21:50
- 提问者网友:千城墨白
- 2021-02-12 15:50
Python 图形界面哪个好
最佳答案
- 二级知识专家网友:怪咖小青年
- 2021-02-12 16:07
你下个 anaconda ,什么都有了。可以搜索了解下。
全部回答
- 1楼网友:废途浑身病态
- 2021-02-12 16:52
这是pyqt4的代码:(你想要安装才可以使用)
from pyqt4 import qtcore, qtgui
class ui_helloword(object):
def setupui(self, helloword):
helloword.setobjectname("helloword")
helloword.resize(400, 300)
self.label = qtgui.qlabel(helloword)
self.label.setgeometry(qtcore.qrect(70, 80, 54, 12))#位置
self.label.setobjectname("label")
self.retranslateui(helloword)
qtcore.qmetaobject.connectslotsbyname(helloword)
def retranslateui(self, helloword):
helloword.setwindowtitle(qtgui.qapplication.translate("helloword", "form", none, qtgui.qapplication.unicodeutf8))
self.label.settext(qtgui.qapplication.translate("helloword", "你好世界", none, qtgui.qapplication.unicodeutf8))
if __name__ == "__main__":
import sys
app = qtgui.qapplication(sys.argv)
helloword = qtgui.qwidget()
ui = ui_helloword()
ui.setupui(helloword)
helloword.show()
sys.exit(app.exec_())
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯