Решил заняться граф.дизайном, но появилась ошибка:
ui.lineEdit.setText(ui.lineEdit.setText("1") + some_text)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
вот код:
from PySide import QtCore, QtGui
import sys
from ui import Ui_Form
app = QtGui.QApplication(sys.argv)
Form = QtGui.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
some_text = ui.lineEdit.selectedText()
# функции
def but1():
ui.lineEdit.setText(ui.lineEdit.setText("1") + some_text)
def but2():
ui.lineEdit.setText("2")
def but3():
ui.lineEdit.setText("3")
def but4():
ui.lineEdit.setText("4")
def but5():
ui.lineEdit.setText("5")
def but6():
ui.lineEdit.setText("6")
def but7():
ui.lineEdit.setText("7")
def but8():
ui.lineEdit.setText("8")
def but9():
ui.lineEdit.setText("9")
# кнопки
ui.but1.clicked.connect( but1 )
ui.but2.clicked.connect( but2 )
ui.but3.clicked.connect( but3 )
ui.but4.clicked.connect( but4 )
ui.but5.clicked.connect( but5 )
ui.but6.clicked.connect( but6 )
ui.but7.clicked.connect( but7 )
ui.but8.clicked.connect( but8 )
ui.but9.clicked.connect( but9 )
# основной код
sys.exit(app.exec_())