cancel
Showing results for 
Search instead for 
Did you mean: 

I deleted a widget (progress bar) now I get a compiler error - seems the old widgets are still attempting to be initialized.

Monika
Associate II

So total rookie here. I thought that if I delete a widget and generate code any code related to the deleted widget would also be removed. But in the .cpp file of the screen where the widget used to be, I'm seeing methods called on the object that doesn't exist!

Here's the errors I'm seeing

0693W000003Rl7eQAC.png

Here's some of the code that shouldn't be there

0693W000003Rl7jQAC.png

Do I have to delete the unneeded code manually?

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Any code inside gui/ is user-code, meaning that the designer does not remove this, even if widgets on the canvas used by that code are removed. The designer can't know. The user code is disjointed from the gui code inside generated/ - You have to fix the compilation errors yourself, but you can "safely" remove the code that references a component that no longer exists =)

/Martin

View solution in original post

3 REPLIES 3
Martin KJELDSEN
Chief III

Any code inside gui/ is user-code, meaning that the designer does not remove this, even if widgets on the canvas used by that code are removed. The designer can't know. The user code is disjointed from the gui code inside generated/ - You have to fix the compilation errors yourself, but you can "safely" remove the code that references a component that no longer exists =)

/Martin

Okay, thanks Martin!

No problem!