How to take information from form layout fields?
-
I have a form layout with labels and text edits made with the following script:
QStringList keys; QList<int> status; for (int i = 0; i < 100; i++) { keys << QString("key %1").arg(i); status << i % 4; } QWidget *wdg = new QWidget; QScrollArea *scroll = new QScrollArea; QWidget *content_widget = new QWidget; QFormLayout *formLayout = new QFormLayout(content_widget); for (int x = 0; x < keys.size(); x++) { QTextEdit *field = new QTextEdit; field->setFixedHeight(28); field->setFixedWidth(100); formLayout->addRow(keys.at(x), field); } scroll->setWidget(content_widget); wdg->setLayout(new QVBoxLayout); wdg->layout()->addWidget(scroll); wdg->show();After having the user fill out the information, I want to be able to extract that information from each field (each QTextEdit). How would I go about doing that?
-
@BasselOmari said in How to take information from form layout fields?:
How would I go about doing that?
Save all created textedits in a container and read them out later on.