Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    [QT 4.6.3] QtreeView: where to put a wait cursor during data search?

    General and Desktop
    2
    5
    1726
    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.
    • A
      Alain38 last edited by

      Hi,
      I have a QTreeView that uses my own QFileModel. In my QFileModel the function data(...) need to perform complex and (quite long) process to be able to determine what to display. So, I want to display a wait cursor so that the user be informed that the computer works.

      I tried to display the wait cursor in data(...). But, when I try to expand a directory, this function is called a lot of time. Then the result is horrible. The numerous switchs between the wait cursor and the normal one are clearly visible.

      I have searched for signals able to help me (emitted of the beginning and end of the display). But I found none of them. It is why I request your help for this problem.

      Thanks a lot in advance.

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        You can create your own signals for that, and use them in your code.

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • A
          Alain38 last edited by

          Hi,
          Creating my own signals will change nothing. The problem is to be able to known when QT start displaying data in a QTreeView, and when it stops.

          1 Reply Last reply Reply Quote 0
          • A
            Alain38 last edited by

            Hi,
            finally I found a better solution. I have overridden the paintEvent of myQtreeView. Qnd it is in this function that I am managing the cursor.

            1 Reply Last reply Reply Quote 0
            • sierdzio
              sierdzio Moderators last edited by

              Nice to hear that, thanks for updating.

              (Z(:^

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