You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Maximum Zoom In causes improper node rendering #121
make couple of nodes ( good example is image loader & display node )
scale up one of the display node to occupy half of window from default
zoom in the view to maximum and scroll.
bug : it doesn't properly render the big display node and the image area looks a proper size, but node widget size is getting smaller to hold the image area and it doesn't the node properly.
I think I'm hitting the same bug and I've been investigating.
It seems to be connected to the caching of QGraphicsItems. Specifically, it's directly affected by the call to setCacheMode in the NodeGraphicsObject constructor.
From playing around with an ImageShowModel node from the samples, it seems that when you zoom a big node, so that its actual size is bigger than the window would be, it gets clipped. I suspect there's a limit on how big a cache can be and the size for the DeviceCoordinateCache case is around the size of the window.
Notes:
If you comment out the setCacheMode line, the problem goes away, but the performance of large scenes will suffer.
If you change the mode to ItemCoordinateCache, then problem goes away, but rendering quality suffers.
A cache size is ignored in the case of DeviceCoordinateCache.
I suspect this may be a Qt bug and that the proper behaviour is that the cache should not be used if it is not big enough. I'm not 100% sure and I don't have time to take it any further tonight. I'm just going to leave this comment here for now.
The following screenshot shows a node zoomed in the Images sample. Notice that the node background is cut off in the top right and bottom left corners:
I did a little more investigation into this bug. I continue to believe it is a Qt problem.
I was able to reproduce it with a trivial set up and it seems to be an interaction between DeviceCoordinateCache and QGraphicsDropShadowEffect: When a QGraphicsItem which is larger than the view widget has a cache type of DeviceCoordinateCache, a drop shadow effect will crop the item to the size of the view widget.
If you don't use the drop shadow effect, then the problem goes away. A possible workaround for nodeeditor is to stop using a DropShadow effect. This bug is quite visible in my project, so I would regard this as a small cost.
Reacted by Daguerreo, Gene Ragan, Ruan Yi and Hedgehog
Hi, on Linux I have very bad performances if I zoom. By commenting the drop shadow effect, the performance issue is gone, everything is smooth and fluid.
Please, can you add an option to disable the Drop shadow effect in NodeGraphicsObject? These are the lines:
{
auto effect = new QGraphicsDropShadowEffect;
effect->setOffset(4, 4);
effect->setBlurRadius(20);
effect->setColor(nodeStyle.ShadowColor);
setGraphicsEffect(effect);
}
Hi, on Linux I have very bad performances if I zoom. By commenting the drop shadow effect, the performance issue is gone, everything is smooth and fluid.
Please, can you add an option to disable the Drop shadow effect in NodeGraphicsObject? These are the lines:
{
auto effect = new QGraphicsDropShadowEffect;
effect->setOffset(4, 4);
effect->setBlurRadius(20);
effect->setColor(nodeStyle.ShadowColor);
setGraphicsEffect(effect);
}
When this paragraph was commented out, everything was fine.
Activity
EssenOH commentedon Oct 4, 2017
Exactly, the biggest node doesn't draw half where is bottom end.
navyenzo commentedon Jul 18, 2018
anybody figured out how to fix this problem?
Malcohol commentedon Jul 30, 2019
I think I'm hitting the same bug and I've been investigating.
It seems to be connected to the caching of QGraphicsItems. Specifically, it's directly affected by the call to setCacheMode in the NodeGraphicsObject constructor.
From playing around with an ImageShowModel node from the samples, it seems that when you zoom a big node, so that its actual size is bigger than the window would be, it gets clipped. I suspect there's a limit on how big a cache can be and the size for the DeviceCoordinateCache case is around the size of the window.
Notes:
I suspect this may be a Qt bug and that the proper behaviour is that the cache should not be used if it is not big enough. I'm not 100% sure and I don't have time to take it any further tonight. I'm just going to leave this comment here for now.
Malcohol commentedon Aug 6, 2019
The following screenshot shows a node zoomed in the Images sample. Notice that the node background is cut off in the top right and bottom left corners:
I did a little more investigation into this bug. I continue to believe it is a Qt problem.
I was able to reproduce it with a trivial set up and it seems to be an interaction between DeviceCoordinateCache and QGraphicsDropShadowEffect: When a QGraphicsItem which is larger than the view widget has a cache type of DeviceCoordinateCache, a drop shadow effect will crop the item to the size of the view widget.
If you don't use the drop shadow effect, then the problem goes away. A possible workaround for nodeeditor is to stop using a DropShadow effect. This bug is quite visible in my project, so I would regard this as a small cost.
Malcohol commentedon Aug 8, 2019
I've filed this as: https://bugreports.qt.io/browse/QTBUG-77400
paceholder commentedon Dec 3, 2022
I was thinking that I am too slow in addressing the issues. But Qt is not much faster.
Daguerreo commentedon Dec 5, 2022
If someone does not raise the version to a newer one (it's marked 15.2), often the issue get lost in the hyperspace. Already happened with the Qt crew
arabine commentedon Feb 14, 2023
Hi, on Linux I have very bad performances if I zoom. By commenting the drop shadow effect, the performance issue is gone, everything is smooth and fluid.
Please, can you add an option to disable the Drop shadow effect in NodeGraphicsObject? These are the lines:
yvanblanchard commentedon Apr 2, 2024
problem is still unfixed by Qt (https://bugreports.qt.io/browse/QTBUG-77400)...
DUDUACM commentedon Nov 18, 2024
When this paragraph was commented out, everything was fine.
lonnie-souder-ii commentedon Jul 24, 2025
Workaround has been merged to master here: b56a7d0
Example code: