#include <QtGui>
Q_OBJECT
public:
public slots:
void check
(const QModelIndex &parent,
int start,
int end
) { qDebug() << Q_FUNC_INFO << start << end;
}
};
#include "main.moc"
int main(int argc, char **argv) {
Dummy d;
model.removeRow(0);
return 0;
}
#include <QtGui>
class Dummy : public QObject {
Q_OBJECT
public:
Dummy() : QObject() {}
public slots:
void check(const QModelIndex &parent, int start, int end) {
qDebug() << Q_FUNC_INFO << start << end;
}
};
#include "main.moc"
int main(int argc, char **argv) {
QCoreApplication app(argc, argv);
QStandardItemModel model(4,2);
Dummy d;
QObject::connect(&model, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)), &d, SLOT(check(QModelIndex, int, int)));
model.removeRow(0);
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks