#include "ProjectView.h" #include "ProjectListWidget.h" #include #include ProjectView::ProjectView(QWidget *parent) : QWidget(parent) { initialize(); initLayout(); connectSiganlsAndSlots(); } void ProjectView::initialize() { m_hBoxLayout = new QHBoxLayout(this); m_projListWidget = new ProjectListWidget(this); m_projListWidget->setFixedWidth(300); m_projDetailWidget = new QWidget(this); m_projLayout = new QVBoxLayout(); m_projNameLabel = new QLabel(this); m_projNameLabel->setText("工程名"); } void ProjectView::initLayout() { m_hBoxLayout->setMargin(0); m_hBoxLayout->addWidget(m_projListWidget); m_hBoxLayout->addStrut(8); m_hBoxLayout->addWidget(m_projDetailWidget); m_projDetailWidget->setLayout(m_projLayout); m_projLayout->addWidget(m_projNameLabel, Qt::AlignTop); } void ProjectView::connectSiganlsAndSlots() { }