diff options
Diffstat (limited to 'src/cookiedialog.cpp')
-rw-r--r-- | src/cookiedialog.cpp | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/cookiedialog.cpp b/src/cookiedialog.cpp index bc704f0b..ea9555eb 100644 --- a/src/cookiedialog.cpp +++ b/src/cookiedialog.cpp @@ -198,33 +198,9 @@ CookiesDialog::CookiesDialog(CookieJar *cookieJar, QWidget *parent) cookieWidget->cookiesTable->setShowGrid(false); cookieWidget->cookiesTable->setSortingEnabled(true); -// QFont f = font(); -// f.setPointSize(10); -// QFontMetrics fm(f); -// int height = fm.height() + fm.height() / 3; -// cookieWidget->cookiesTable->verticalHeader()->setDefaultSectionSize(height); -// cookieWidget->cookiesTable->verticalHeader()->setMinimumSectionSize(-1); - -// for (int i = 0; i < model->columnCount(); ++i) -// { -// int header = cookieWidget->cookiesTable->horizontalHeader()->sectionSizeHint(i); -// switch (i) -// { -// case 0: -// header = fm.width(QLatin1String("averagehost.domain.com")); -// break; -// case 1: -// header = fm.width(QLatin1String("_session_id")); -// break; -// case 4: -// header = fm.width(QDateTime::currentDateTime().toString(Qt::LocalDate)); -// break; -// } -// int buffer = fm.width(QLatin1String("xx")); -// header += buffer; -// cookieWidget->cookiesTable->horizontalHeader()->resizeSection(i, header); -// } -// cookieWidget->cookiesTable->horizontalHeader()->setStretchLastSection(true); + // Fixing header dimension + QHeaderView *headerView = cookieWidget->cookiesTable->horizontalHeader(); + headerView->setResizeMode(QHeaderView::ResizeToContents); } |