title: Qt load indicator by animated image (aka preloader) or alternative?
body: <p>I want to display an animated loader image on my table view while loading. The screenshot below shows an impression.</p>
  
  <p>I have used an animated gif for that, displayed by <code>setStyleSheet</code> as centered background image.</p>
  
  <p><a href="https://i.stack.imgur.com/SVHZ3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SVHZ3.png" alt="Loader image"></a></p>
  
  <p>I face two issues:</p>
  
  <ol>
  <li>The gif is displayed, but not animated. Is it possible to display an animated gif as background image (via stylesheet)? Remark: In general an animated gif is possible as shown in  <a href="https://stackoverflow.com/questions/5769766/qt-how-to-show-gifanimated-image-in-qgraphicspixmapitem">Qt - How to show gif(animated) image in QGraphicsPixmapItem</a> but there seems to be no animated <code>gif</code> with style sheets <a href="https://stackoverflow.com/q/11873372/356726">Animated Gif static in QStyleSheet</a></li>
  <li>I have problems to clear the image once loading is done. If I clear the stylesheet with <code>setStyleSheet("")</code> then it is still displayed. The only trick working for me is to override it as 1 pixel transparent image</li>
  </ol>
  
  <p>Is there a solution to those issues or even a better approach (overlay widget? / specialized Qt widget for that)?</p>
  
  <p>(My code exampled with Qt 5.4 / Win7)</p>
  
  <hr>
  
  <p>Edit: <a href="https://stackoverflow.com/a/26958738/356726">https://stackoverflow.com/a/26958738/356726</a> shows how such a gif can be animated, but I have no idea to use that in such a kind of overlay / background style.</p>