Results 1 to 2 of 2

Thread: Crash while checking the index is of particular level of a tree

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Crash while checking the index is of particular level of a tree

    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

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Crash while checking the index is of particular level of a tree

    it would be better if you provide more code. according to snippet of you code hard to say where problem is.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.