我是python和qt设计器的新手用户。我做了一个简单的python代码来随机生成数字。现在我想要的是,当我点击一个按钮时,输出将在GUI上,而不是在终端上。到目前为止,我已经设法点击一个按钮,输出将在终端生成,但这不是我想要的。在
这里是我在qt设计器中制作的qt图形用户界面,没有修改脚本。谢谢你的帮助!在# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qt_hello.ui'
#
# Created: Sat Jul 20 21:22:41 2013
# by: PyQt4 UI code generator 4.10.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambi