changed to 80 max column

This commit is contained in:
fourtf
2018-08-06 21:17:03 +02:00
parent defa7e41fa
commit f71ff08e68
203 changed files with 3792 additions and 2405 deletions
+6 -3
View File
@@ -31,14 +31,16 @@ EditableModelView::EditableModelView(QAbstractTableModel *model)
// add
QPushButton *add = new QPushButton("Add");
buttons->addWidget(add);
QObject::connect(add, &QPushButton::clicked, [this] { this->addButtonPressed.invoke(); });
QObject::connect(add, &QPushButton::clicked,
[this] { this->addButtonPressed.invoke(); });
// remove
QPushButton *remove = new QPushButton("Remove");
buttons->addWidget(remove);
QObject::connect(remove, &QPushButton::clicked, [this] {
QModelIndexList list;
while ((list = this->getTableView()->selectionModel()->selectedRows(0)).length() > 0) {
while ((list = this->getTableView()->selectionModel()->selectedRows(0))
.length() > 0) {
model_->removeRow(list[0].row());
}
});
@@ -55,7 +57,8 @@ void EditableModelView::setTitles(std::initializer_list<QString> titles)
break;
}
this->model_->setHeaderData(i++, Qt::Horizontal, title, Qt::DisplayRole);
this->model_->setHeaderData(i++, Qt::Horizontal, title,
Qt::DisplayRole);
}
}