I need to create a QVectorIterator to iterate a QVector of QStrings as follows:
#include <QString>
#include <QVectorIterator>
#include <QLabel>
#include <QTimer>
class Dice : public QLabel
{
Q_OBJECT
private:
QVector<QString> dice_faces;
QVectorIterator<QString> it( dice_faces );
QTimer *timer;
...
But I get this error, and don't understand what is wrong, or did QVectorIterator can't iterate over QString vector?
Dice.h:16: error: 'dice_faces' is not a type
QVectorIterator<QString> i( dice_faces );
^
You need to initialize the iterator in the initializer list in the constructor
dice.cpp