What would be the best way to prevent a window freeze the other windows?

I tried to move my QMainWindow to a thread (QMainWindow::moveToThread), but this is not possible for the widgets can not be moved.

I'd like to open a new window in a separate process.

The reason is that if this new page has a script to freeze the window he ends up freezing all other windows.

Qt Code:
  1. class myWebPage : public QWebPage {
  2. QWebPage * createWindow(QWebPage::WebWindowType type) {
  3. Q_UNUSED(type);
  4. QMainWindow *wx = new mBROWSERQT(NULL,true);
  5. QWebView *wv = wx->findChild<QWebView*>("mybrowsertest");
  6.  
  7. wx->showNormal();
  8. return wv->page();
  9. }
  10. };
  11.  
  12. ...
  13.  
  14. ui->mybrowsertest->setPage(new myWebPage());
To copy to clipboard, switch view to plain text mode