mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
allow the user resizing the columns in the details view
svn path=/trunk/KDE/kdebase/apps/; revision=743538
This commit is contained in:
parent
3b8571ec59
commit
278cb078d6
1 changed files with 10 additions and 2 deletions
|
@ -136,7 +136,7 @@ bool DolphinDetailsView::event(QEvent* event)
|
|||
{
|
||||
if (event->type() == QEvent::Polish) {
|
||||
QHeaderView* headerView = header();
|
||||
headerView->setResizeMode(QHeaderView::Fixed);
|
||||
headerView->setResizeMode(QHeaderView::Interactive);
|
||||
headerView->setMovable(false);
|
||||
|
||||
updateColumnVisibility();
|
||||
|
@ -322,8 +322,16 @@ void DolphinDetailsView::keyPressEvent(QKeyEvent* event)
|
|||
void DolphinDetailsView::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
QTreeView::resizeEvent(event);
|
||||
|
||||
// TODO: There seems to be no easy way to find out whether the resize event
|
||||
// has been triggered because of resizing the window or by adjusting the column-width
|
||||
// by a left mouse-click (the columns should only be resized automatically when the window
|
||||
// size is adjusted). The following workaround works well, but it should be
|
||||
// considered solving this in a more transparent way.
|
||||
if (!(QApplication::mouseButtons() & Qt::LeftButton)) {
|
||||
resizeColumns();
|
||||
}
|
||||
}
|
||||
|
||||
void DolphinDetailsView::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue