I added some pushbuttons and deleted the menu bar and toolbar in the main window.

After running, I found that if I resize, the window scroll-bars don't appear.

I don't want the pushbuttons to resize or move. I am fine with them becoming invisible, but I want the scrollbars, so that the user can scroll to the invisible parts.
So, I added a scroll area widget. When I increase the size of the scroll area up to the window size; after running, the window appears blank. Maybe the push-buttons go 'below' the scroll-area. How do I change which object should be on 'top'?
I used the setCentralwidget(ui->scrollareacontentswidget);, and tried deleting the centralwidget, but I can't.

Источник: https://stackoverflow.com/questions/129 ... o-a-window
Мобильная версия