Create treeview Use in log file tags
-
wrote on 11 Apr 2013, 03:51 last edited by
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 )
Thanks
-
wrote on 11 Apr 2013, 04:27 last edited by
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":http://qt-project.org/doc/qt-5.0/qtwidgets/examples-itemviews.html -
wrote on 11 Apr 2013, 04:48 last edited by
Really thanks for your fast reply actually its like that i had log file with tags in this tags in some order like
<1>
<1.1>
<1.1.1>
data ....
<\1.1.1>
<\1.1>
<\1>
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 ?Thanks
-
wrote on 11 Apr 2013, 05:25 last edited by
It is can be effective and convenient if you make "lazy tree model".
-
wrote on 11 Apr 2013, 05:36 last edited by
Really thanks for your reply i will check
-
wrote on 11 Apr 2013, 11:26 last edited by
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":http://www.qtcentre.org/archive/index.php/t-28082.html will help you. -
wrote on 11 Apr 2013, 21:16 last edited by
Thanks for your reply i will try
4/7