The user is prompted with a file dialog and chooses a full path which is then put inside a QTableWidgetItem cell within a parent QTableWidget. Currently, when there is an overflow of text in the item and what it can display, it will show the left portion first.
If the full path is C:\Users\JohnDoe\Example_File1.txt it will show: C:\Users\JohnDoe\Ex...
I want the user to be able to see the right portion (the file basename) first before the overflow cutoff occurs such that it will read:
...Doe\Example_File1.txt
I tried implement the following code which changed the alignment but did not appear to work as described above:
obj = self.QTable1 #A 10x3 table
for x in range(obj.rowCount()):
item = obj.item(x,2) #Change alignment for 3rd column (Where paths are stored)
item.setTextAlignment( QtCore.Qt.AlignRight)