jchanvfx / NodeGraphQt

Node graph framework that can be re-implemented into applications that supports PySide2
http://chantonic.com/NodeGraphQt/
MIT License
1.27k stars 259 forks source link

Node width too large for custom widgets #402

Open FlorianRaichle opened 8 months ago

FlorianRaichle commented 8 months ago

Thank you for this amazing project! I have noticed a sizing issue when embedding custom widgets:

Nodes with a custom widget become too wide based on their name. Screenshot from 2024-01-26 09-38-11

The issue seems to be that the custom widget width is just added to the total width. Instead it should probably go into the calculation together with the port text width. https://github.com/jchanvfx/NodeGraphQt/blob/deaf3b1ec86dad5705bbd973d273356420eaa99c/NodeGraphQt/qgraphics/node_base.py#L394

This is based on this example using 0.6.35.