Drawing some lines in OnPaint function of widget is creating artifacts in viewport

I am basically doing this in the OnPaint function of one of my widgets:


And ingame I get these ugly artifcats on the top and left side of the viewport:


The artifacts are only there if I move the camera.

Why I need to draw multiple lines? Look at the smiley on the bottom right of the screen - his mouth are just many lines drawed in OnPaint. Unfortunately this is the only way to create a not-straight line.

Hello ,

I was unable to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. What version of the engine are you using?
  2. Can you reproduce this issue in a clean project?
  3. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  4. Are there any other blueprints involved out side the widgets that you have shown?

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Hi Rudy, seems I have overlooked your answer…

  1. 4.7.5
  2. I have not tried
  3. Create a widget where you put the stuff in OnPaint what I have shown in the first screenshot and add this widget to the viewport. Hit play and move the camera around.
  4. Other widgets which are the parent of the widget, but that should not matter

I just tested it in a new project, it seems this issue only occurs if the OnPain function of a child widget is used, not the OnPaint function of the Main widget.
And it only occurs in a new editor window, not the default viewport.

I have attached the test project for you:


Hello ,

I was able to reproduce this issue on our end. However, after a bit of testing I found that this issue has been resolved internally. This solution will be available in a later release of the engine. I hope that this information helps. Thank you for your information and time.

Make it a great day

Does “resolved internally” means resolved in 4.8?

Hello ,

I went ahead and tested this issue in 4.8 for you and it appears to have been resolved in 4.8.

Make it a great day

Hi Rudy, I have tried it in 4.8 and I still get the same issue :frowning:

Hello ,

I pulled up the project that was originally submitted to this thread for testing. After upgrading that project to 4.8 I did not see the issue. Are there any differences in the setup that is needed to reproduce the issue that you are seeing in 4.8?

I have not changed anything in my setup, still just drawing 10 or 20 lines in the OnPaint function.

Hello ,

Could you try downloading the project that is linked in this thread and then upgrade it to 4.8? This way we will have a bench mark. My results were that it was broken in 4.7, however after upgrading the project to 4.8 the issue was gone. Could you then post your results?

I have downloaded the project linked above and converted it to 4.8 and I am getting the mentioned problems, same as in 4.7. I really hoped this would be fixed in 4.8, I don’t want to have to wait for 4.9 to get this working :frowning:

Hello ,

After some more testing I found that I was able to reproduce the issue on our end. I have written up a report ( UE-17226) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information

Make it a great day

Found the problem. Scheduling to be hot-fixed in 4.8.2. https://github.com/EpicGames/UnrealEngine/commit/63026b3afe97ebe6896f2548927820b360d9cbf0

Great! Thanks so much!