void ArenaHandler::completeUI() { createTreeWidget(); ui->updateButton->setToolTip(tr("Refresh")); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(refresh())); connect(ui->donateButton, SIGNAL(clicked()), this, SLOT(openDonateWeb())); //Rewards UI ui->lineEditGold->setMinimumWidth(1); ui->lineEditArcaneDust->setMinimumWidth(1); ui->lineEditPack->setMinimumWidth(1); ui->lineEditPlainCard->setMinimumWidth(1); ui->lineEditGoldCard->setMinimumWidth(1); hideRewards(); connect(ui->rewardsNoButton, SIGNAL(clicked(bool)), this, SLOT(hideRewards())); connect(ui->rewardsYesButton, SIGNAL(clicked(bool)), this, SLOT(hideRewards())); connect(ui->rewardsYesButton, SIGNAL(clicked(bool)), this, SLOT(uploadRewards())); }
DiagramToolBox::DiagramToolBox(DiagramView* diagramView) : QWidget() { mDiagramView = diagramView; createActions(); QVBoxLayout* vLayout = new QVBoxLayout(); vLayout->addWidget(createButtonBox()); vLayout->addWidget(createTreeWidget(), 100); setLayout(vLayout); setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); connect(mDiagramView, SIGNAL(modeChanged(DrawingView::Mode)), this, SLOT(updateDiagramMode(DrawingView::Mode))); }
void MainWidget::centralLayout() { //中央区左侧 QWidget* central_l = new QWidget; central_l->setLayout(new QVBoxLayout); central_l->layout()->setMargin(0); central_l->layout()->setSpacing(0); central_l->layout()->addWidget(createListWidget()); central_l->layout()->addWidget(createTreeWidget()); //中央区右侧 QWidget* central_r = new QWidget; central_r->setStyleSheet("QWidget{background-color:white;}"); central_r->setLayout(new QVBoxLayout); central_r->layout()->addWidget(createIconWidget()); this->m_central->addWidget(central_l); this->m_central->addWidget(central_r); QList<int> list; list<<200<<700; this->m_central->setSizes(list); }