From: Zabin on
Hey!

I am trying to align contents of some table cells but find the code
below working for some fields and not for others. I am stuck as to why
this is happening. Help will be gretly appreciated!

setTextAlignment(QtCore.Qt.AlignVCenter)

Cheers
Zabin
From: Zabin on
On Jan 11, 1:10 pm, Zabin <zabin.faris...(a)gmail.com> wrote:
> Hey!
>
> I am trying to align contents of some table cells but find the code
> below working for some fields and not for others. I am stuck as to why
> this is happening. Help will be gretly appreciated!
>
> setTextAlignment(QtCore.Qt.AlignVCenter)
>
> Cheers
> Zabin

Figured it out!
It was just the '\n' character being read with the line from the text
file that messed up the formatting.
just needed to use the line.strip() function before passing it to the
table as a table widget item.