app = QtGui.QApplication([])
w = QtGui.QWidget()
le = QtGui.QLineEdit(w)
lay = QtGui.QHBoxLayout()
w.setLayout(lay)
lay.addWidget(le)
le.setStyleSheet('border: 1px solid red;')
w.show()
app.exec_()
Цвет границы PyQT QLineEdit