Да, это нормальное поведение. И попадают они не на layout, а на QWidget
(родителя, тот который this
).
If parent is 0, the new widget becomes a window. If parent is another
widget, this widget becomes a child window inside parent.
Layout сам назначает родителя виджетам, а сам лишь управляет их позиционированием.
When you use a layout, you do not need to pass a parent when
constructing the child widgets. The layout will automatically reparent
the widgets (using QWidget::setParent()) so that they are children of
the widget on which the layout is installed.
Как грамотно лейаутить написано здесь.
Пример:
QWidget *window = new QWidget;
QPushButton *button1 = new QPushButton("One");
QLineEdit *lineEdit1 = new QLineEdit();
QPushButton *button2 = new QPushButton("Two");
QLineEdit *lineEdit2 = new QLineEdit();
QPushButton *button3 = new QPushButton("Three");
QLineEdit *lineEdit3 = new QLineEdit();
QFormLayout *layout = new QFormLayout;
layout->addRow(button1, lineEdit1);
layout->addRow(button2, lineEdit2);
layout->addRow(button3, lineEdit3);
window->setLayout(layout);
window->show();