Important: Please read the Qt Code of Conduct -

Create treeview Use in log file tags

  • Hi
    I am new to Qt development and i need some advice ,My problem is like that I had Qt application with treeview i want to fill that tree view use in log file data Some one have better idea about that please help me to solve that problem.

    (Assume log file had tags like main item,sub main item etc... i want to get that tags in to treeview )


  • Hi!
    Did you try do something? Is your question about using treeview, or reading log file or make model for treeview? There are few examples for treeviews: "Itemview Examples":

  • Really thanks for your fast reply actually its like that i had log file with tags in this tags in some order like
    data ....
    Now i want create treeview base on that tags simply i plan create XML file use in that log file tags after use in that XML file data i decide to create treeview its possible or cost effictive or their are any solution to do that requirement ?


  • It is can be effective and convenient if you make "lazy tree model".

  • Really thanks for your reply i will check

  • You could basically write your own model derived from the QAbstractItemModel and load data only when the use clicks the parent indexes to view the child indexes. Basically, functions
    QAbstractItemModel::canFetchMore, QAbstractItemModel::fetchMore, QAbstractItemModel::hasChildren and QAbstractItemModel::rowCount. need to be overridden and manipulated.
    Just to cut short "this": will help you.

  • Thanks for your reply i will try

Log in to reply