how to grab the delete key - esp. to prevent scene node deletion.

daz3d_142e40a1c1daz3d_142e40a1c1 Posts: 11
edited December 1969 in Daz SDK Developer Discussion

as the title says.

as soon a scene node is selected, there isn't even a key event to catch in an event filter installed on dzapp level. so i do really wonder how to intercept it..

thanks...

Comments

  • dtammdtamm Posts: 126
    edited December 1969

    t__3 said:
    as the title says.

    as soon a scene node is selected, there isn't even a key event to catch in an event filter installed on dzapp level. so i do really wonder how to intercept it..

    thanks...

    The only option I know is QWidget::grabkeyboard(). This usually ends up being alot of work and not working nicely with other widgets. But in simple cases it can work.

  • daz3d_142e40a1c1daz3d_142e40a1c1 Posts: 11
    edited December 1969

    dtamm said:
    t__3 said:
    as the title says.

    as soon a scene node is selected, there isn't even a key event to catch in an event filter installed on dzapp level. so i do really wonder how to intercept it..

    thanks...

    The only option I know is QWidget::grabkeyboard(). This usually ends up being alot of work and not working nicely with other widgets. But in simple cases it can work.

    thanks for the fast response. i do not force the use of that key right away, but the ui of my plugin is pretty big and complex, and there are just some places where users instinctively press DEL to delete something... and are puzzled why they had just deleted half their scene instead, as it is just not obvious that pressing the del key will still cause scene object deletion.

    since the downsides in using grabkeyboard look about the same like using the winapi (what would have been my next step), so i'll try my luck with that one first- thanks for the hint...

  • Kendall SearsKendall Sears Posts: 2,995
    edited December 1969

    It'd be great if we could tell studio to cancel the Scene Node deletion.

    Kendall

  • daz3d_142e40a1c1daz3d_142e40a1c1 Posts: 11
    edited December 1969

    It'd be great if we could tell studio to cancel the Scene Node deletion.

    Kendall

    ++

    to do this for my plugin, i needed to intercept the del key on system level. what apparently breaks portability...

Sign In or Register to comment.