With PyQT and a QTreeView, I need to display a “loading” message or a “spinning wheel” when the user expands an item, because the childs are retrieved by making a http request.
Any ideas on how to implement this?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the time taken to retrieve the child items is relatively short (say, a few seconds), then by far the simplest solution is to display a busy/wait cursor.
You can either set the cursor on the treeview:
or set it globally:
But other solutions will be much more complicated than this.
For instance you could show a QProgressBar in the status bar, or perhaps use a QMovie to display an animated icon somehow.