Skip to content

Sidebar: Use different times for auto-expand vs. auto-collapse of sidebar items - #16870

Draft
cr7pt0gr4ph7 wants to merge 4 commits into
mixxxdj:mainfrom
cr7pt0gr4ph7:rtm_sidebar_autocollapse
Draft

Sidebar: Use different times for auto-expand vs. auto-collapse of sidebar items#16870
cr7pt0gr4ph7 wants to merge 4 commits into
mixxxdj:mainfrom
cr7pt0gr4ph7:rtm_sidebar_autocollapse

Conversation

@cr7pt0gr4ph7

Copy link
Copy Markdown
Contributor

This improves usability on laptop touchpads and other devices where accurate movements while holding down the mouse button are difficult.

This builds upon #16869.

…nd SidebarModel::UrlRole

The URLs associated with the tree items are used during Drag & Drop
operations to identify those tree items.
Starting with at least Qt 5.0.0 (released in 2011) and still present
in current versions of Qt (Qt 6.8.0 at the time of this commit), there
is a bug in the implementation of QTreeView::dragMoveEvent and autoExpandDelay:

QT BUG DESCRIPTION

Instead of resetting the delay timer whenever the mouse moves to a
new item, it is reset on every little mouse movement, which makes
autoExpand useless e.g. on laptop touchpads.

OUR WORKAROUND

Only reset the delay timer whenever the mouse has moved to a new item,
by bypassing QTreeView::dragMoveEvent() and directly calling
QAbstractItemView::dragMoveEvent() instead unless the mouse
has moved to a new item.
@cr7pt0gr4ph7
cr7pt0gr4ph7 force-pushed the rtm_sidebar_autocollapse branch from d25f93c to ecd2766 Compare August 11, 2026 09:26
This improves usability on laptop touchpads and other devices where
accurate movements while holding down the mouse button are difficult.
@cr7pt0gr4ph7
cr7pt0gr4ph7 force-pushed the rtm_sidebar_autocollapse branch from ecd2766 to 055a564 Compare August 11, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant