M
M
Mercury132015-12-30 18:27:03
Qt
Mercury13, 2015-12-30 18:27:03

Qt: how to intercept the event "mouse cursor is on the scroll bar"?

I am working with an editable table, and the task arose: to ensure that those elements that can be edited have a different cursor. Is the mouse pointer gone? — return the standard cursor. Moved to title? is also standard. While I came across such a task: when the cursor is hovering over the scroll bar, the cursor remains a caret.
It is necessary either to intercept the "cursor left the client area" event, or to work with the cursor in some other way than QWidget::setCursor.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2016-07-01
@Mercury13

For most components, you can replace the scrollbars with your own. You can do anything with them.

O
Onito, 2015-12-31
@Onito

mouseMoveEvent()
{
underMouse()
}
or explicitly check if the coordinates where the cursor is

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question