From 8b63a9575187c509f129bab05269d13403416ec7 Mon Sep 17 00:00:00 2001
From: stefan <stefan@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Mon, 19 Apr 2010 14:25:53 +0000
Subject: [PATCH] FileTypeDialog, column sizes

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2051 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 modules/gui/src/file_type_dialog.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/src/file_type_dialog.cc b/modules/gui/src/file_type_dialog.cc
index 3f137f82d..cba2cba95 100644
--- a/modules/gui/src/file_type_dialog.cc
+++ b/modules/gui/src/file_type_dialog.cc
@@ -39,9 +39,8 @@ FileTypeDialog::FileTypeDialog(const QString& file_name, QWidget* parent):
   QVBoxLayout* vb=new QVBoxLayout(this);
   label_ = new QLabel("The file format could not be recognized, please select the type of the file from the list:");
   list_ = new QTableWidget(this);
+  list_->horizontalHeader()->setStretchLastSection(true);
   list_->setColumnCount(2);
-  list_->setColumnWidth(0, 50);
-  list_->setColumnWidth(1,525);
   list_->verticalHeader()->setVisible(false);
   list_->horizontalHeader()->setVisible(false);
   list_->setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -82,6 +81,8 @@ FileTypeDialog::FileTypeDialog(const QString& file_name, QWidget* parent):
     handler.setValue(surf_handler[i]);
     this->AddRow(list_->rowCount(),surf_handler[i]->GetFormatName().c_str(),surf_handler[i]->GetFormatDescription().c_str(),handler);
   }
+
+  list_->resizeColumnsToContents();
 }
 
 void FileTypeDialog::AddRow(int row, const QString& format_name, const QString& format_descr, QVariant& variant){
-- 
GitLab