PDA

View Full Version : QLabel AlignRight doesn't work



HappyCoder
28th April 2017, 09:14
Hi,
12448

I have a QTableWidget and insid each cell is widget with
a horizontal layout with three QLabel. Each QLabel is set to AlignRight.
When i write to the left QLabel a number greater than 10 you can
see that the left QLabel ignores the AlignRight.

Anyone who has an idea why QLabel ignores the AlignRight?

Regards

Santosh Reddy
3rd May 2017, 07:14
The issue is not with QLabel, as each cell has different layout, you cannot expect a label to align with label in other cells below/above. Depending on your UI requirements, you may use QGridLayout instead of QTableWidget.