c++qtresizeqstatusbar

Prevent window resize during QStatusBar resize


If application's main window has QStatusBar and if it's width becomes bigger (for example during adding a widget) than the main window's width, the window automatically resizes to fit status bar. I wonder is there way to prevent window's size changes in such cases?

Thanks in advance!


Solution

  • I've found a way out of this situation. I added a QScrollArea to my status bar and now I add my widgets to that scroll area, so they do not affect on main window's size.