Hi,

I have the following slot -

Qt Code:
  1. QObject::connect(ui.addCasePushButton, SIGNAL(clicked ()), this, SLOT(browseToCaseFile()));
  2.  
  3. void SelectCaseWindow::browseToCaseFile()
  4. {
  5. QString fileName = QFileDialog::getOpenFileName(this, tr("Browse to Case File"), "/home/", tr("Case Files (*.cas)"));
  6.  
  7. repaint();
  8.  
  9. // if a file is selected
  10. if(!fileName.isEmpty())
  11. localCaseList->addLocally(QDir(fileName));
  12. }
To copy to clipboard, switch view to plain text mode 

The problem is that addLocally takes about 20 seconds to process. As a result, there is a grey patch over the SelectCaseWindow where the file dialog was, which disappears after the slot function completes. What can I do to update this region of the screen before I call addLocally? The repaint doesn't seem to do anything.

I'm working on Ubuntu 9.04.

Thanks,

Barry.