1  {
 2     QScrollArea *scrollArea = new QScrollArea(this);
 3     scrollArea->setFrameStyle(0);
 4     scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
 5     scrollArea->setWidgetResizable(true);
7 QWidget* container = new QWidget(scrollArea); 8 scrollArea->setWidget(container); 9 container->setMinimumHeight(900); 10 }

 Qt 界面中使用QScrollArea类实现窗口滚动,

posted on 2018-12-03 09:38  静观海月  阅读(1591)  评论(0编辑  收藏  举报