mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2024-11-23 20:10:48 +08:00
24 lines
643 B
C++
24 lines
643 B
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
|
|
|
#ifndef MYMODEL_H
|
|
#define MYMODEL_H
|
|
|
|
//! [Quoting ModelView Tutorial]
|
|
// mymodel.h
|
|
#include <QAbstractTableModel>
|
|
|
|
class MyModel : public QAbstractTableModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit MyModel(QObject *parent = nullptr);
|
|
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
};
|
|
//! [Quoting ModelView Tutorial]
|
|
|
|
#endif // MYMODEL_H
|