This is a false positive (since the newly created QFormLayout takes
a widget as its parent), however some slight rearrangement of
code shuts up clang-tidy without resorting to NOLINT.
// provide specialized config widgets for those (which may be a good idea anyway, e.g. if we
// think about client-side translations...)
// provide specialized config widgets for those (which may be a good idea anyway, e.g. if we
// think about client-side translations...)
- QGroupBox *fieldBox = new QGroupBox;
+ auto *fieldBox = new QGroupBox;
fieldBox->setTitle(title);
fieldBox->setTitle(title);
+ auto *formLayout = new QFormLayout;
+ fieldBox->setLayout(formLayout);
- QFormLayout *formLayout = new QFormLayout(fieldBox);
for (auto &&fieldInfo : fieldInfos) {
QWidget *widget {nullptr};
switch (std::get<2>(fieldInfo).type()) {
for (auto &&fieldInfo : fieldInfos) {
QWidget *widget {nullptr};
switch (std::get<2>(fieldInfo).type()) {