void Victims::load()
{
int grows = ui->tw->rowCount();
int gcols = ui->tw->columnCount();
set.beginGroup("setting");
for(int i = 0; i < grows ;i++)
{
for(int j = 0; j < gcols ;j++)
{
QString ex
= set.
value("victims", str
).
toString();
widgetItem->setText(ex);
}
}
set.endGroup();
}
void Victims::save()
{
int grows = ui->tw->rowCount();
int gcols = ui->tw->columnCount();
set.beginGroup("setting");
for(int i = 0; i < grows ;i++)
{
for(int j = 0; j < gcols ;j++)
{
str = widgetItem->text();
}
}
set.setValue("victims", str);
set.endGroup();
}
void Victims::load()
{
int grows = ui->tw->rowCount();
int gcols = ui->tw->columnCount();
QSettings set("victims");
set.beginGroup("setting");
for(int i = 0; i < grows ;i++)
{
for(int j = 0; j < gcols ;j++)
{
QTableWidgetItem* widgetItem = ui->tw->item(grows, gcols);
QString ex = set.value("victims", str).toString();
widgetItem->setText(ex);
}
}
set.endGroup();
}
void Victims::save()
{
int grows = ui->tw->rowCount();
int gcols = ui->tw->columnCount();
QSettings set("victims");
set.beginGroup("setting");
for(int i = 0; i < grows ;i++)
{
for(int j = 0; j < gcols ;j++)
{
QTableWidgetItem* widgetItem = ui->tw->item(grows, gcols);
str = widgetItem->text();
}
}
set.setValue("victims", str);
set.endGroup();
}
To copy to clipboard, switch view to plain text mode
Can you tell me what I did wrong here?
Bookmarks