Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Create treeview Use in log file tags

    General and Desktop
    3
    7
    1860
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Diluka 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

      1 Reply Last reply Reply Quote 0
      • Q
        qxoz 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

        1 Reply Last reply Reply Quote 0
        • D
          Diluka 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

          1 Reply Last reply Reply Quote 0
          • Q
            qxoz last edited by

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

            1 Reply Last reply Reply Quote 0
            • D
              Diluka last edited by

              Really thanks for your reply i will check

              1 Reply Last reply Reply Quote 0
              • P
                prady_80 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.

                1 Reply Last reply Reply Quote 0
                • D
                  Diluka last edited by

                  Thanks for your reply i will try

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post