hi,

I have a QModelIndex const& index & a tree of five levels,starting from Level1 to Level5.

For checking the levels we have isLevel functions for each level, which return bool value,
& we have to only pass the modelIndex(it contain the row number, colomn number & the parent pointer), which we want to check.

Now i want to check that the given model index(index) is of which level, the small code i am using is shown below.

QModelIndex const& index
QAbstractItemModel* model;
bool flag;
flag = model->IsLevel2(index );

when i am using this it is crashing, Suggest something what i should do