将滚动条添加到 Qwidget [英] Adding scroll bar to a Qwidget

查看:62
本文介绍了将滚动条添加到 Qwidget的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向框架容器添加滚动条.QscrollArea 只能采用小部件,但在我的框架中,我需要很多 wigets

I want to add scroll bars to the frame container. the QscrollArea can only take on widget but in my frame I need many wigets

我尝试在添加水平和垂直后为条形编写代码,但太难了.有没有我可以使用的预制免费代码?

I tried to write a code for the bars after adding a horizantal and vertical one but It's too hard.Is there any pre-made free code I could use ?

谢谢

推荐答案

QScrollArea 可以采用任意数量的小部件 - 间接.widget() 可以包含任意数量的子小部件,它可以有一个布局集等.参见例如这个答案.

QScrollArea can take any number of widgets - indirectly. The widget() can contain any number of child widgets, it can have a layout set, etc. See e.g. this answer.

这篇关于将滚动条添加到 Qwidget的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆