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
));
}
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));
}
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.
Bookmarks