Can i input data to the database using a table?
-
So i know that forms are used to input data to a database. Is there any way i could use a tablewidget or a tableview to input data? The table has the columns set so i only have to add the records i.e create new rows and enter corresponding data, and then the usual database process of submitting and outputting the data is also included.
-
Hi,
Please don't post the same thread multiples times
"Duplicate":http://qt-project.org/forums/newreply/32802/
-
So i created a new thread by editing the previous one, is this allowed??
-
AFAIK, it's not forbidden.
As for your current question, have a look at QTableView and QSqlTableModel, that should give you a good start
-
i can only think of
@
QList<QCheckBox*>allcheckboxes = findChildren <QCheckBox*>();//then try
allcheckboxes.text(i);
//to extract the label of the checkbox at index i
@
i don't know if this is allowed but its all i've got right now and i could really use an example because i have no idea what to do??? -
If you want to go with findChildren you will have to iterate through allCheckBoxes.
@QStringList labelTextList;
foreach (QCheckBox *checkBox, allCheckBoxes) {
if (the_test_you_need) {
labelTextList << checkBox->text();
}
}
return labelTextList;
@