Mercurial > trustbridge
diff ui/administratorwindow.cpp @ 395:a63601810211
Resized administrator main window and columns.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 15 Apr 2014 16:44:55 +0200 |
parents | 7e0a188d6848 |
children | 26651cc0cc47 |
line wrap: on
line diff
--- a/ui/administratorwindow.cpp Tue Apr 15 16:43:45 2014 +0200 +++ b/ui/administratorwindow.cpp Tue Apr 15 16:44:55 2014 +0200 @@ -28,6 +28,7 @@ createMenuBar(); createContent(); loadCertificateTable(); + resize(1110, 700); } void AdministratorWindow::createActions() @@ -73,10 +74,8 @@ CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView); certificateView->setModel(certificateModel); certificateView->setItemDelegate(delegate); - certificateView->setColumnWidth(0, 50); - certificateView->setColumnWidth(2, 130); - certificateView->setColumnWidth(3, 130); - certificateView->setColumnWidth(4, 200); + certificateView->resizeColumnsToContents(); + certificateView->setColumnWidth(0, 60); certificateView->setSelectionBehavior(QAbstractItemView::SelectRows); connect(certificateView, SIGNAL(clicked(const QModelIndex&)), this, SLOT(clickedCertificate(const QModelIndex&))); @@ -124,8 +123,6 @@ // managed in the central widget. base->setLayout(mainLayout); setCentralWidget(base); - certificateView->horizontalHeader()->setSectionResizeMode(1, - QHeaderView::Stretch); } void AdministratorWindow::loadCertificateFile() @@ -168,6 +165,8 @@ foreach(const Certificate &cert, certList.getCertificates()) { certificateModel->addCertificate(cert, true); } + certificateView->resizeColumnsToContents(); + certificateView->setColumnWidth(0, 60); } void AdministratorWindow::addToCertificateTable(const QList<Certificate> &certs)