Column widths saving to user settings.

Fixed memory leak in AutoTableModel.
This commit is contained in:
2016-03-02 20:33:24 +01:00
parent f49f19783e
commit d108a42b08
4 changed files with 19 additions and 0 deletions
+6
View File
@@ -98,6 +98,12 @@ public slots:
hide.append(var.toInt());
}
QMap<QString, QVariant> widths = Context::instance().settings()->value("grids/" + pluginId() + "/widths").toMap();
foreach (QString key, widths.keys()) {
tableView()->setColumnWidth(key.toInt(), widths[key].toInt());
}
connect(tableView()->horizontalHeader(), SIGNAL(sectionResized(int,int,int)), this, SLOT(widthChanged(int,int,int)));
hideColumns(hide);
}