I have a base class that has some gui elements that I set to use the constructor in the Qt creator. These elements are:
QWidget* w1;
QWidget* w2;
QWidget* w3;
Now in the class that inherits this base class, I would like to "convert" these widgets to lineEdit elements that will contain all the geometric parameters of these widgets. So I am doing something like this:
QLineEdit* leAmplitude;
leAmplitude = new QLineEdit(ui->w1);
leAmplitude->setGeometry(ui->w1->geometry());
ui->glControls->addWidget(leAmplitude);
But the added item QLineEditdoes not appear in the same place as the w1 item. It is simply added at the bottom of other controls in QGridLayoutglControls. How to make lineEdit accept all geometric parameters from w1?