paceholder / nodeeditor

Qt Node Editor. Dataflow programming framework
BSD 3-Clause "New" or "Revised" License
2.94k stars 796 forks source link

Strange white lines occur while draging a node #294

Closed hooyuser closed 2 years ago

hooyuser commented 2 years ago

I tried two examples calculator and example2 and found there were some strangle white lines when I dragged a node. Here is my screenshot.

node

These white lines will disappear altogether if I zoom in or zoom out.

paceholder commented 2 years ago

I've seen that on Windows, it might have been a debug build. Seems like a Qt bug. Do you mange to reproduce it with a more recent Qt version and with the Release build?

facontidavide commented 2 years ago

I have the same problem on Ubuntu, Qt 6.2.3

facontidavide commented 2 years ago

I think I fixed the issue with some googling: https://stackoverflow.com/questions/47265389/qgraphicsview-rubberbanddrag-leaves-artifacts

add setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); to GraphicsView constructor.

aldric-diamoco commented 2 years ago

Hi, Windows, msvc 2019 64 bit, same issue here both in debug and release qt 6.2.1

add setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); to GraphicsView constructor. partially solve the probem when just moving a node, but not when using the treeview (right click)

I am trying to fix it but graphical programming is not really my stuff. Thank you for the nice job, if you got an idea... could be cool

paceholder commented 2 years ago

I've pushed the fix with the changes proposed in @facontidavide 's link. I don't think I can do more than that because I cannot reproduce it.

My setup: Linux, Qt 6.2.4, GCC 11.2.0

aldric-diamoco commented 2 years ago

I've pushed the fix with the changes proposed in @facontidavide 's link. I don't think I can do more than that because I cannot reproduce it.

My setup: Linux, Qt 6.2.4, GCC 11.2.0

Hi, thank you, I did the patch myself, as I said it partially solved the problem. Looks like old days backbuffer problems. I'll take one day today to see if I can solve it without breaking the code too much.(Sorry for my english)

aldric-diamoco commented 2 years ago

Solved. While I don't really know why. Applied your patch AND update my qt to 6.3 makes your nodeeditor runs smoothly without artifact. I have one or two questions to ask about using it, may I contact you via e-mail?

paceholder commented 2 years ago

@aldric-diamoco,

sorry, just noticed your last question. Sure, you can contact me via e-mail. Closing this issue for now.