summaryrefslogtreecommitdiffhomepage
path: root/gui/process-detector-fancy-table.cpp
blob: 1f13fc43c7e751b227d802db779d32de050847a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "process-detector-fancy-table.hpp"

#include <QHeaderView>

void FancyTable::resizeEvent(QResizeEvent* e)
{
    QTableView::resizeEvent(e);
    int w = width();
    setColumnWidth(2, 32);
    w -= 32;
    setColumnWidth(0, w / 2);
    setColumnWidth(1, w / 2);
    horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed);
}

FancyTable::FancyTable(QWidget* parent) : QTableWidget(parent) {}