Introduced own version of QTableView called PgLabTableView that has some other defaults.

This commit is contained in:
eelke 2018-12-29 17:54:54 +01:00
parent f0ffcf4abd
commit f6ea2ce0a6
9 changed files with 42 additions and 32 deletions

14
pglab/PgLabTableView.cpp Normal file
View file

@ -0,0 +1,14 @@
#include "PgLabTableView.h"
#include "PgLabItemDelegate.h"
#include <QHeaderView>
PgLabTableView::PgLabTableView(QWidget *parent)
: QTableView(parent)
{
setAlternatingRowColors(true);
setItemDelegate(new PgLabItemDelegate(this));
auto vertical_header = verticalHeader();
vertical_header->setMinimumSectionSize(16);
vertical_header->setDefaultSectionSize(20);
}