forked from qt-creator/qt-creator
Help: Fix crash when using drag&drop with bookmarks
On Windows the combination drag&drop, proxy model and header section resize mode ResizeToContents leads to a crash in Qt. Task-number: QTCREATORBUG-17547 Change-Id: I3a763c22b83e43d1c1a222cefb4fbbc56b9082c4 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -443,6 +443,10 @@ void BookmarkWidget::setup()
|
||||
treeView->setDropIndicatorShown(true);
|
||||
treeView->viewport()->installEventFilter(this);
|
||||
treeView->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
// work around crash on Windows with drag & drop
|
||||
// in combination with proxy model and ResizeToContents section resize mode
|
||||
treeView->header()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
|
||||
|
||||
connect(treeView, &TreeView::expanded, this, &BookmarkWidget::expand);
|
||||
connect(treeView, &TreeView::collapsed, this, &BookmarkWidget::expand);
|
||||
|
Reference in New Issue
Block a user