Hello!

I'm trying to create web interface testing program which should open two urls in two (or more) webkit windows simultaneously.

I already did the code for the test automation which perfectly works in single way mode:

1) User pushes 'Go' button and webkit (QWidget) window opens

2) TestBot class object performs tests

3) Closes

Now my question: After clicking on the button 'Go', how do I open two (or three or more) webkit (QWidget) windows, I mean, how do I launch several TestBots simultaneously so they do all the work parallel?

I understood, that I need to look at multithreads, I came up I need to inherit QThread into my TestBot class definition as 'class TestBot : public QThread', but is this right solution and do I do it right? What's to do next?

Can't I just write code as:

Qt Code:
  1. QThread process1;
  2. QThread process2;
  3. process1->start();
  4. //some code here
  5. process1->quit();
  6.  
  7. process2->start();
  8. //some code here
  9. process2->quit();
To copy to clipboard, switch view to plain text mode 
to make everything work parallel?

I'm a newbie in Winapp world, I came from Web programming. Hope for your help!