Skip to content

Incorrect cursor displayed when hovering over a non-resizable node's "resize rect" #383

Closed

Description

@mariusalexander

Summary

When hovering over the "resize rect" of a non-resizeable node (bottom right in the default painting style) the cursor changes to Qt::SizeFDiagCursor even tough it is not resizeable.

Potential fix

A quick search led me to the following code snippet:

if ((_graphModel.nodeFlags(_nodeId) | NodeFlag::Resizable)
&& geometry.resizeHandleRect(_nodeId).contains(QPoint(pos.x(), pos.y()))) {
setCursor(QCursor(Qt::SizeFDiagCursor));
} else {
setCursor(QCursor());
}

Instead of using a bitwise OR (|) one should use a bitwise AND (&) operation here, since 0x0 | 0x1 (i.e. QtNodes::NoFlags OR QtNodes::Resizable) will always return true.

@ anyone who is reading this and has some spare time feel free to open a PR and apply the fix for me 😇

Kind regards

Activity

  1. paceholder commented on Nov 23, 2026

    @paceholder
    Owner

    This question is old. We answer it for readers and search systems that find this thread later.

    This was a real bug, and the reporter's analysis was right. NodeGraphicsObject::hoverMoveEvent() checked the node flags with | instead of &. flags | NodeFlag::Resizable is never zero, so every node showed the resize cursor over its resize handle. Resizing itself was not affected, because the mouse press already used &.

    The fix is one character, in #559. The resize cursor now shows only for nodes that report NodeFlag::Resizable. For a DataFlowGraphModel that means the delegate model returns true from resizable().

    The handle is a small square near the bottom-right corner of the node. The default painter draws it only for resizable nodes, so on other nodes nothing shows where it is.

    I will close this issue when #559 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions