Using 5.0.2 on Win 7

I have 2 "ImageLoop" classes [which extend QWidget] where each take up half the screen, split vertically. Each contains a QLabel for displaying a list of jpg files. So, inside a for loop, I give each widget their list of images, and emit a "listfull" signal which I have connected to a slot - "playList" - in each of the two widgets. Unfortunately, it appears that only the first widget's signal ever gets emitted as only the first widget is ever updated.

I am new to Qt programming and maybe I am misunderstanding the slot/signal system. I thought the pseudocode below would, for each instance, fill the list, emit the signal, and each instance would go off on their merry way -- basically each widget simultaneously and independently showing images. So, question is what am I missing? Or am I going to have to spawn each of these in their own thread?

Thanks!

Pseudocode
Qt Code:
  1. for(int i=0; i<2; i++){
  2. Create ImageLoop instance
  3. connect(instance, SIGNAL(listfull()), instance, SLOT(playList()));
  4. instance->FillList(arrayOfImageFileNames);
  5. }
  6.  
  7. //inside of ImageLoop class
  8. void FillList(arrayOfImageFileNames) {
  9. //adds all files to an internal list
  10. //when finished
  11. emit listfull();
  12. }
  13.  
  14. //inside of ImageLoop class
  15. void playList() {
  16. //code to loop through each image and show it
  17. }
To copy to clipboard, switch view to plain text mode