QSplitter original size



  • I have layout a QSplitter which is working fine as follows:

               docker = new QDockWidget("Setup");
               addDockWidget(Qt::LeftDockWidgetArea,docker);
    
               split = new QSplitter;
               split->setOrientation(Qt::Vertical);
               split->setChildrenCollapsible(false);
    
               split_setup = new QSplitter;
               split_setup->setOrientation(Qt::Vertical);
               split_setup->setChildrenCollapsible(false);
    
               docker->setWidget(split_setup);
    
                split->addWidget(plots[sessions]);
    

    and I am now wandering if there is a way to resize the various windows to their initial sizes
    after being changed within the QSplit windows

    Thks in advance for your coop


  • Moderators

    @jipe3001
    use QSplitter::saveState()/restoreState()


 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.