How to include child mouse hover events in the parent MouseArea using QML?

前端 未结 4 1915
自闭症患者
自闭症患者 2021-02-02 09:20

I want to implement the following scenario in QML.

\"Scenario\"


Here is a sample/simplified delegat

4条回答
  •  北恋
    北恋 (楼主)
    2021-02-02 09:48

    Try this:

    • add a signal to the inner area that's emitted on mouse enter.
    • Connect the signal to the outer area.
    • The signal causes the outer area to enter the hovered state.

    Mouse exit on both will still cancel hover state. As you move the mouse off the controls it should work correctly without any extra code

提交回复
热议问题