View Full Version : QTreeView: mouse move on an item to highlight it as pre-selection
jasonhxs
13th August 2014, 15:00
Hi,
As pre-selection, when mouse move on an item in QTreeView, I want to raise the border of the item, but no solution yet. Any suggestion will be appreciated, thanks.
anda_skoa
13th August 2014, 15:33
You could overwrite the view's mouseMoveEvent() handler and use itemAt() to find the item you are currently at.
There is also an entered() signal.
Cheers,
_
jasonhxs
14th August 2014, 03:44
Hi,
Thanks, yes, I catch it, do you know how to raise the border of item in QTreeView?
anda_skoa
14th August 2014, 11:15
You can use a custom item delegate that draws differently if the cell is hovered over.
Cheers,
_
jasonhxs
18th August 2014, 04:37
Hi,
I use style sheet with item hover setting, thanks.
anda_skoa
18th August 2014, 06:00
Ah, even simplier :)
Cheers,
_
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.