views:

91

answers:

1

Hi fellows!

I'm trying to format a Qt lineEdit text with colors.

 def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.lineEdit.setText("here be colors")

I searched a lot but only found customized drawing widgets with monstrous amounts of code. Is there any easier way to format the lineEdit box than customizing the whole?

+1  A: 

Maybe use a QTextEdit, and limit it to one line.

Gary van der Merwe