Commit 1c5e771b authored by Eike Ziller's avatar Eike Ziller

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's avatarDavid Schulz <david.schulz@qt.io>
parent a0125a6e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment