summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-02-02 21:20:27 +0100
committerYorhel <git@yorhel.nl>2009-02-02 21:20:27 +0100
commit1da74dc30f86f69cc3f946fd5d03bd3fb8654e53 (patch)
tree4d60e60eeeb33845b80d693d2a6c6c0c3c5230a8
parent385ed9346cd87eeb2645cf0e217d59718844293f (diff)
Made the QTableView line list look better
-rw-r--r--seentl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/seentl.cpp b/seentl.cpp
index c84d412..e06b5d2 100644
--- a/seentl.cpp
+++ b/seentl.cpp
@@ -1,5 +1,7 @@
#include "seentl.h"
#include "ui_seentl.h"
+#include <QHeaderView>
+#include <QDebug>
SEENTL::SEENTL(QWidget *parent)
: QMainWindow(parent), ui(new Ui::SEENTLClass)
@@ -8,8 +10,16 @@ SEENTL::SEENTL(QWidget *parent)
script.openScript("SEEN0517.utf");
+ // some settings to make the lines table look good
+ ui->lines->verticalHeader()->setDefaultSectionSize(ui->lines->fontMetrics().height()+1);
+ ui->lines->horizontalHeader()->setVisible(0);
+ ui->lines->verticalHeader()->setVisible(0);
ui->lines->setModel(&script);
-
+ ui->lines->horizontalHeader()->setResizeMode(0, QHeaderView::ResizeToContents);
+ ui->lines->horizontalHeader()->setResizeMode(1, QHeaderView::Stretch);
+ ui->lines->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch);
+ ui->lines->horizontalHeader()->setResizeMode(3, QHeaderView::Fixed);
+ ui->lines->horizontalHeader()->resizeSection(3, 100);
}
SEENTL::~SEENTL()