Results 1 to 14 of 14

Thread: Need to show SQL data in tree view with lazy loading.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2013
    Location
    Bangalore
    Posts
    49
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Need to show SQL data in tree view with lazy loading.

    Hi,

    I have a huge data in mysql data base. The data in data base as follows for example.

    Qt Code:
    1. Level Date name rank
    2. 0 1/1/15 Rajesh 1
    3. 1 1/1/15 Krish 2
    4. 2 1/1/15 Ram 3
    5. 1 1/1/15 Krish 4
    6. 0 1/1/15 Krish 5
    7. 1 1/1/15 Krish 6
    8. 1 1/1/15 Krish 7
    9. 0
    10. 1
    11. 1
    12. 2
    13. 2
    14. 1
    15. .
    16. .
    17. .
    To copy to clipboard, switch view to plain text mode 
    So, From the above table I need to build the tree view based on level column.
    All zeros are parents followed by 1’s are child's of 0's above that, and 2’s are child's of 1’s above that (tree should be formed as below).



    Tree:

    0
    ---------1
    ---------------------------2
    ----------1
    0
    -----------1
    -----------1
    0
    -----------1
    -----------1
    ---------------------------2
    ---------------------------2
    ------------1

    I have huge set of records, more than 20 lak , here I have to do lazy loading i.e. I should not read all the data and put in some container and then building parent and child relationship.

    Lazy Loading: instead of reading and putting all the data memory, read the data which is currently viewing.

    Here I have to do lazy loading, I want read the data of how many tree items I am showing on view currently.
    I am not able to get how to build parent and child relationship with this requirement,
    Any suggestions for the above requirement ???

    Requirement = Mysql data base (huge set of data) + Tree view + Lazy loading. (I am using Qt 4.8.5)


    Thanks in advance.
    Last edited by DURGAPRASAD NEELAM; 15th April 2015 at 16:30.

Similar Threads

  1. table view and tree view
    By MKSPulok in forum Qt Programming
    Replies: 1
    Last Post: 16th June 2012, 21:48
  2. Replies: 1
    Last Post: 3rd October 2011, 15:40
  3. How to map tree model data to list view
    By msopanen in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 19:56
  4. data, model and tree view
    By larry104 in forum Qt Programming
    Replies: 17
    Last Post: 3rd July 2006, 14:43
  5. Model, view, resize to show all data
    By jcr in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2006, 20:59

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.