Как добавить полосу прокрутки в окно?C++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Как добавить полосу прокрутки в окно?

Сообщение Anonymous »


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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»