This fixes the 'flashing' icon when clicking repeatedly on a TQIconView or
derivates (ie TDEIconView, KonqIconViewWidget, the KDesktop and so on..).
The current behavior considers that if not over an icon, the user is
clicking down to perform icons selection (with the rubberband).
This is not always true, since a click might be used to give focus to a
window or unselect some icons.
How this is fixed: when clicking down the mouse a flag is set. If the pointer
is moved on the iconview with the button held down, then (and only at that
moment) the rubber is created. Now a selection operation (the one done with
the rubber) begins when moving the mouse and not only when clicking on the
empty space.
Test case (using konqueror icon view):
- The first icons are being shown (no scrollbar yet)
- When there is no space left, a vertical scrollbar is needed
- The vertical scrollbar may cover the right edge of the icons
(in the last column) => an horizontal scrollbar is needed :-(
Solution:
When using ScrollBarMode::Auto, prevent TQt from drawing icons on the
scrollbar area (before the scrollbar is shown).
Related to KDE bug #69589