Internal
Public Access
Fix profile dialog form fields collapsing to sizeHint on macOS
QFormLayout without an explicit field growth policy falls back to the active Qt style's default, which differs per platform: Linux's Fusion/Breeze styles expand fields to fill the row, but macOS's native style defaults to FieldsStayAtSizeHint, leaving fields small with empty space beside them. Set the policy explicitly so the dialog renders consistently everywhere. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,9 @@ ProfileDialog::ProfileDialog(QWidget* parent)
|
||||
|
||||
auto* layout = new QVBoxLayout(this);
|
||||
auto* form = new QFormLayout();
|
||||
form->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
form->setFormAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
form->setLabelAlignment(Qt::AlignRight);
|
||||
|
||||
m_nameInput->setPlaceholderText(QStringLiteral("Production Bastion"));
|
||||
m_hostInput->setPlaceholderText(QStringLiteral("example.internal"));
|
||||
|
||||
Reference in New Issue
Block a user