Qt--QScrollArea

一、介绍

1、The QScrollArea class provides a scrolling view onto another widget.

2、A scroll area is used to display the contents of a child widget within a frame. If the widget exceeds the size of the frame, the view can provide scroll bars so that the entire area of the child widget can be viewed. 

 

二、示例

1、代码

//
QScrollArea  *sa_div;   /* 画面滑动创建 
 /* 滑动区域 */
sa_div = new QScrollArea(wd_preview);
sa_div->setWidget(wd_previewDiv);
sa_div->resize(wdMainWidth * 4/5, wdMainHeight);
sa_div->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);    /* 隐藏滑动条 */
sa_div->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
//

 

致谢

1、Qt help文档

2、Qt 之 QScrollArea--一去、二三里

 

 

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 技术黑板 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读