布局测试

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);

 

 

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

posted @ 2022-05-08 12:49  西北逍遥  阅读(32)  评论(0编辑  收藏  举报