lineEdit = QtGui.QLineEdit()
1、设置内容
lineEdit.setText(u'呵呵哒')
2、获取内容
context = lineEdit.text()
3、限制输入
reg = QtCore.QRegExp("[0-9]+\,[0-9]+") #Qt正则 lineEdit.setValidator(QtGui.QRegExpValidator(reg,self))
4、焦点
lineEdit.setFocusPolicy(Qt.ClickFocus) #