You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
#include "todaywidget.h"
|
|
#include "ui_TodayWidget.h"
|
|
#include "widget/distributewidget.h"
|
|
#include <QTableView>
|
|
#include <QLabel>
|
|
|
|
TodayWidget::TodayWidget(QWidget* parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::TodayWidget)
|
|
{
|
|
ui->setupUi(this);
|
|
//测试数据,用于观看样式及功能
|
|
QVBoxLayout* exchangeLayout = new QVBoxLayout;
|
|
DistributeWidget* m_distributeWidget = new DistributeWidget;
|
|
exchangeLayout->addWidget(m_distributeWidget);
|
|
//table
|
|
QWidget* topRiseWidget = new QWidget;
|
|
QVBoxLayout* topRiseLayout = new QVBoxLayout;
|
|
topRiseWidget->setLayout(topRiseLayout);
|
|
QLabel* topRiseLabel = new QLabel(QStringLiteral("涨幅榜"));
|
|
QTableView* topRisetableView = new QTableView;
|
|
topRiseLayout->addWidget(topRiseLabel);
|
|
topRiseLayout->addWidget(topRisetableView);
|
|
|
|
QWidget* topFallWidget = new QWidget;
|
|
QVBoxLayout* topFallLayout = new QVBoxLayout;
|
|
topFallWidget->setLayout(topFallLayout);
|
|
QTableView* topFalltableView = new QTableView;
|
|
QLabel* topFallLabel = new QLabel(QStringLiteral("跌幅榜"));
|
|
topFallLayout->addWidget(topFallLabel);
|
|
topFallLayout->addWidget(topFalltableView);
|
|
|
|
QHBoxLayout* tableLayout = new QHBoxLayout;
|
|
// tableLayout->addWidget(topRisetableView);
|
|
tableLayout->addWidget(topRiseWidget);
|
|
tableLayout->addWidget(topFallWidget);
|
|
|
|
exchangeLayout->addLayout(tableLayout);
|
|
ui->tab->setLayout(exchangeLayout);
|
|
}
|
|
|
|
TodayWidget::~TodayWidget()
|
|
{
|
|
delete ui;
|
|
}
|