I want to write a text in QTextBrowser in PyQt. I have something like this:
for line in working_data:
word = line.split(";")
self.ui.textBrowser.append("{:30}{:>30}".format(word[1], word[2]))
With this I get something like (left and right alignment):
ID Value
123 10,00
1234 20,00
1 330,00
12345 1,00
I would like to have it like this:
ID Value
123 10,00
1234 20,00
1 330,00
12345 1,00
How to achieve that? I looked here and tried {:30}'.format('test')
and {:>30}'.format('test')
for right align case, but it would'n reserve 30 places for a first word.