[Paraview-developers] Hiding programmatically a Toolbar in a pvCustomApplication

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Sat Mar 10 05:51:52 EST 2018


Have you tried the following?

QTollBar* tb = mainWindow->findChild<...>(...);
mainWindow->removeToolBar(tb);
delete tb;

Utkarsh

On Thu, Mar 8, 2018 at 10:20 AM, Louka Jacques--Chevallier
<louka.jacques--chevallier at pi.esisar.grenoble-inp.fr> wrote:
> Hello again,
> We're trying (yet failing) to hide a Toolbar programmatically in a pvCustomApplication.
> The toolbar has been installed using : pqParaViewMenuBuilders::buildToolbars(*this);
>
> What actually works :
> -Accessing the toolbar, clearing its content
> -Showing the toolbar
>
> What doesn't work :
> -Hiding the toolbar...
>
> What has been tried :
> -this->findChild<QToolBar *>("MainControlsToolbar")->hide();
> -this->findChild<QToolBar *>("MainControlsToolbar")->toggleViewAction()->setChecked(false);
>
> It seems that it's (quite) the right way, but we're definitely missing a part...
> Any hint or idea to troubleshot ?
>
> Have a great day ! ^.^
> Luc, Sebastien & Louka
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview-developers


More information about the Paraview-developers mailing list