Making plugin's panel invisible programmatically

Dear PV devs,

How do I make a panel of a plugin invisible within c++?
By panel I mean <PropertyGroup> which has a name and several properties.

So far, I have tried calling hide() and setVisibility(false), to no effect.

I have also tried to find how the “panel_visibiliy” is implemented in the code and I found no related methods.

Thank you for your help.

Sincerely,
Art

You need to use hide() on the widget instance. Make sure you are calling it on the right object.