[Paraview-developers] Qt state at start of test

David Thompson david.thompson at kitware.com
Fri Dec 21 09:26:13 EST 2012


Hi all,

> Yup, you simply change the default visibility of the toolbar in
> ParaViewMainWindow.cxx (or whatever that class if called). The
> QSettings are loaded after the Window is created and hence user-chosen
> visibility is restored automatically.

To add some closure to this on-list, things ended up being a little more complicated; toolbars that correspond to application submenus are not created by the time the code in ParaViewMainWindow has completed (they are created by a response to a signal generated when the menu is first mapped to the screen). So now the pqCategoryToolbarsBehavior class (which creates toolbars from menu items) keeps a list of toolbars to hide when test recordings or playbacks commence, and responds to "started" signals emitted by pqEventTranslator and pqEventDispatcher by hiding toolbars in the list.

	David


> On Thu, Dec 20, 2012 at 10:09 AM, David Thompson
> <david.thompson at kitware.com> wrote:
>> Hi all,
>> 
>> Is there a way to change ParaView user interface settings across all tests (without editing each test's XML file)?
>> 
>> I have added a new toolbar that appears to be changing window geometries and causing small differences in a bunch of test images and would like it to be initially hidden during testing. I don't see a way to make it hidden by default as QToolBar->hide() upon creation has no effect, and triggering a hide() when QToolBar emits visibilityChanged(true) seems like a bad idea (if the user has QSettings that hide the toolbar, this will keep it from appearing upon user-request).
>> 
>>        Thanks,
>>        David



More information about the Paraview-developers mailing list