Barry79
11th May 2009, 14:28
Hi,
I have the following slot -
QObject::connect(ui.addCasePushButton, SIGNAL(clicked ()), this, SLOT(browseToCaseFile()));
void SelectCaseWindow::browseToCaseFile()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Browse to Case File"), "/home/", tr("Case Files (*.cas)"));
repaint();
// if a file is selected
if(!fileName.isEmpty())
localCaseList->addLocally(QDir(fileName));
}
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.
I have the following slot -
QObject::connect(ui.addCasePushButton, SIGNAL(clicked ()), this, SLOT(browseToCaseFile()));
void SelectCaseWindow::browseToCaseFile()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Browse to Case File"), "/home/", tr("Case Files (*.cas)"));
repaint();
// if a file is selected
if(!fileName.isEmpty())
localCaseList->addLocally(QDir(fileName));
}
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.