| | |
| | | |
| | | // 模型及表格视图 |
| | | m_model = new QStandardItemModel(this); |
| | | m_model->setColumnCount(10); // 设置10列 |
| | | m_model->setColumnCount(11); // 设置11列 |
| | | QStringList labels; |
| | | labels<<"股票名字"<<"股票代号"<<"总市值(亿)"<<"流通市值(亿)"<<"涨跌幅(%)"<<"收盘价"<<"成交额(亿)"<<"成交量(手)"<<"换手率(%)"<<"市盈率"; |
| | | labels<<"股票名字"<<"股票代号"<<"总市值(亿)"<<"流通市值(亿)"<<"涨跌幅(%)"<<"收盘价"<<"成交额(亿)"<<"成交量(手)"<<"换手率(%)"<<"市盈率"<<"交易额排名"; |
| | | m_model->setHorizontalHeaderLabels(labels); // 设置模型的列标签名 |
| | | m_customModel = new CustomSortProxyModel; |
| | | m_customModel->setSourceModel(m_model); // 设置源模型 |
| | |
| | | qDebug()<<"历史到信息赋值完成 条数:"<<m_model->rowCount(); |
| | | qDebug()<<QDateTime::currentDateTime(); |
| | | } |
| | | |
| | | void GetStockList::getStockNamesByNum(int num) |
| | | { |
| | | for(int i=0;i<num;++i){ |
| | | qDebug()<<i+1<<m_model->item(i,0)->text(); |
| | | emit sendNameToAnalysis(m_model->item(i,0)->text()); // 发名字给缓存分析界面来依次分析 |
| | | } |
| | | } |