Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [QT 4.6.3] QtreeView: where to put a wait cursor during data search?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.9k Views
  • 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 Offline
    A Offline
    Alain38
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

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

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alain38
        wrote on last edited by
        #3

        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
        0
        • A Offline
          A Offline
          Alain38
          wrote on last edited by
          #4

          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
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Nice to hear that, thanks for updating.

            (Z(:^

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved