Results 1 to 5 of 5

Thread: simple image slide show using property animations

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: simple image slide show using property animations

    Thanks - d_stanz:
    Rewrote the code as per your suggestion (much better) and although it made no difference to the operation of the animation your suggestion set me on the path to finding the issue. I then switched to debugging in visual studio code on windows (deploying to the pi later) rather than directly on the Raspberry pi. This showed that the animation was running in a separate thread second time around -- as result of using apscheduler and pydispatch to manage the timed image change. Worked perfectly when I got it running on the main thread. The apscheduler and pydispatch mechanism was carried over from a previous development of message Queue based sensor stations that don't have GUI components. Will now remove pydispatch and use signals /slots.
    Thanks again

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,328
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: simple image slide show using property animations

    In Qt (at least the C++ implementation, which I am sure the Python implementation is just layered on top of), all GUI activity has to occur in the main thread (the one that holds the QApplication instance). You can do other Qt things in threads (like manipulate images and such) but when it comes to displaying them, that has to happen in the main thread.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Aug 2020
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: simple image slide show using property animations

    What was interesting this time was there was no exception raised, as has been true on the other occasions I have tried to update the ui from a different thread. That's why I thought it was my understanding rather than a problem with my code. Thanks

Similar Threads

  1. Slide Show using QGraphicscene
    By Surendark in forum Newbie
    Replies: 1
    Last Post: 26th March 2015, 13:07
  2. Create slide show
    By iswaryasenthilkumar in forum Newbie
    Replies: 2
    Last Post: 4th December 2014, 11:55
  3. a set of images slide show on a single QLabel
    By lyw8120 in forum Qt Programming
    Replies: 9
    Last Post: 17th March 2014, 13:19
  4. Slide show using QProperty animation
    By mvbhavsar in forum Newbie
    Replies: 0
    Last Post: 10th August 2011, 10:24
  5. slide show
    By jeetu_happy in forum Qt Programming
    Replies: 3
    Last Post: 18th January 2007, 12:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.