size - QT - Resize QToolbar -


i have concatenate toolbar. every toolbar have call:

toolbar->setgeometry(x,y,width,height) 

but have no resize.

i try call

toolbar->updategeometry(); 

but nothing.

my goal expand every toolbar size definition

there chance using repositioning toolbars on init , saving @ closing.

here solid way that:

what need use qmainwindow savegeometry() , restoregeometry() functions , save , load byte array through qsettings interface.

writesettings

qsettings s;  s.begingroup("mainwindow");  this->restoregeometry(s.value("geometry").tobytearray()); this->restorestate(s.value("windowstate").tobytearray());  s.endgroup(); 

readsettings

qsettings s;  s.begingroup("mainwindow");  s.setvalue("geometry", savegeometry()); s.setvalue("windowstate", savestate());  s.endgroup(); 

hope helps.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -