Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Field : public QAbstractListModel
- {
- Q_OBJECT
- public:
- Field(int width = 0, int height = 0);
- QVector<int>& operator[](int n) {return (v_field.begin()[n]);}
- private:
- int width, height;
- QVector< QVector<int> > v_field;
- };
- field[0][0] = 0; // Экземпляр класса Field
- qDebug() << "<<<<<<<<<<" << this->field[0][0];
- QVector<int>& operator[](int n) {return v_field[n];}
- const QVector<int>& operator[](int n) const {return v_field[n];}
Add Comment
Please, Sign In to add comment