其他分享
首页 > 其他分享> > 布局测试

布局测试

作者:互联网

qt布局测试

 

//dockWidget_log
scrollAreaLogDock = new QScrollArea(dockWidget_log);
scrollAreaLogDock->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
scrollAreaLogDock->setWidgetResizable(true);

QScrollBar* logDockVerticalScrollBar = scrollAreaLogDock->verticalScrollBar();
logDockVerticalScrollBar->setStyleSheet("background: #ccc;");
dockWidget_log->setWidget(scrollAreaLogDock);



QVBoxLayout *verticalLayout_logWindow;
verticalLayout_logWindow = new QVBoxLayout();
verticalLayout_logWindow->setSpacing(6);
verticalLayout_logWindow->setObjectName(QString::fromUtf8("verticalLayout_logWindow"));
scrollAreaLogDock->setLayout(verticalLayout_logWindow);


qtextEditObj = new QTextEdit(dockWidget_log);
verticalLayout_logWindow->addWidget(qtextEditObj);

 

 

#############

标签:logWindow,log,QSizePolicy,布局,scrollAreaLogDock,verticalLayout,测试,dockWidget
来源: https://www.cnblogs.com/herd/p/16245325.html