Efo*_*fog 0 c++ qt dictionary vector
我有QMap与QVector内:
QMap<QString, QMap<QGraphicsView*, QVector<float>>> graphs;
Run Code Online (Sandbox Code Playgroud)
我正在尝试执行此代码:
QVector<float>* graphValues = &(graphs.values()[i - values.count()].values()[0]);
graphValues->push_back(1234);
qDebug() << "=== Debug messages ===\r\n";
qDebug() << "i - values.count() = " << i - values.count();
qDebug() << "graphValues = " << graphValues;
qDebug() << "*graphValues = " << *graphValues;
qDebug() << "graphs = " << graphs;
qDebug() << "graphs.values()[i - values.count()].values()[0] = " << graphs.values()[i - values.count()].values()[0];
Run Code Online (Sandbox Code Playgroud)
它给了我输出:
i - values.count() = 0
graphValues = 0x2000e90
*graphValues = QVector(1234)
graphs = QMap(("tempgraph", QMap((QGraphicsView(0x1fb1920) , QVector() ) ) ))
graphs.values()[i - values.count()].values()[0] = QVector()
Run Code Online (Sandbox Code Playgroud)
那么,我的价值在哪里?使用指针i等待我的值graphs,但它消失了.
| 归档时间: |
|
| 查看次数: |
81 次 |
| 最近记录: |