I have designed an UI
with Qt but I am facing an issue. In my UI
I use two QLineEdit
for IP addresses. They have a fixed width using setFixedWidth
.
When the childWidget that contains them is set on top with parentLayout->setAlignment(&childWidget, Qt::AlignTop)
I get the correct width of QLineEdit
:
But when childWidget
is vertically centered and on the left with:
parentLayout->setAlignment(&childWidget, Qt::AlignVCenter | Qt::AlignLeft)
I get a smaller width of QLineEdit
:
I don't understand why the QLineEdit
have a smaller width when the childWidget
is on the left, their width should be the same, as it's fixed.