简体   繁体   中英

PyQt - Qt Designer Scroll area and Scroll bar

My PyQt image

Hello, I'm making a window in PyQt and I would like to know how to add a scroll area. What I want to do is have a scroll bar to the right that will scroll down to more push buttons without resizing the window. I've seen widgets such as "scroll area" and "scroll bar" in PyQt, but I don't know how to implement them. I'm making this window in Qt Designer. Thanks.

Just place the Scroll Area and place all the things in there that will need to scroll-able (like you would do for a frame). The size of this area will then depend on the surrounding widgets, as well as the area's settings. But if it gets too small to show everything inside it then it will automatically place the scrollbar at the correct side. Viola.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM